vassili
06-20-2007, 01:02 AM
i have this variable totalPages. it's a single digit number that varies book from book. this variable can be found in colmun BD, but the row is always different in each book.
i need to create a function that can find the string
totalPages & "OF" & totalPages
this code doesn't work
Cells.Find(What:=totalPages & "OF" & totalPages).Activate
the main point is, within the workbook, i want to find the last page based on its 'based on its page number. my program already knows how many total pages there are by parsing cell BD4. the varibiable totalPages will be asigned the last digit in BD4...thus TOTAL PAGES.
because the form is in chinese, there is no way for me to easily search strings of text. so all i can do is search by #. the form comes in 2 basic flavors. one with the last page "info sheet" as seen in the attatchment (which varies in legnth), and one without an info sheet.
i need to compare the last page to the previous ones to see if in fact it is different or not so i can add those highlighted rows accordingly. the info sheet does not get extra rows under column "BN".
the way i see it, the only difference that is easy to spot would be under column a. while the regular pages under coln a will contain either a "#" ie. "23" or "#alphabet" ie. "24a" the info sheet will only contain alphabets at this time ie. "A"
i was thinking of comparing those values to see if the last page is indeed an info page or not. i figure if i can find where the last page starts, i can then see if there's a number under "coln a" or an alphabet.
i can't count on the fact that the A in coln a on the info page is exactly 6 rows down from ("page: totalPage"OF"totalPage) as the person who inputs this stuff sometimes fudges the rows and it turns out it's only 3 rows down or 7 rows down.
can't just do a search for "A" either as it could appear elsewhere in the form. what do i do???
i need to create a function that can find the string
totalPages & "OF" & totalPages
this code doesn't work
Cells.Find(What:=totalPages & "OF" & totalPages).Activate
the main point is, within the workbook, i want to find the last page based on its 'based on its page number. my program already knows how many total pages there are by parsing cell BD4. the varibiable totalPages will be asigned the last digit in BD4...thus TOTAL PAGES.
because the form is in chinese, there is no way for me to easily search strings of text. so all i can do is search by #. the form comes in 2 basic flavors. one with the last page "info sheet" as seen in the attatchment (which varies in legnth), and one without an info sheet.
i need to compare the last page to the previous ones to see if in fact it is different or not so i can add those highlighted rows accordingly. the info sheet does not get extra rows under column "BN".
the way i see it, the only difference that is easy to spot would be under column a. while the regular pages under coln a will contain either a "#" ie. "23" or "#alphabet" ie. "24a" the info sheet will only contain alphabets at this time ie. "A"
i was thinking of comparing those values to see if the last page is indeed an info page or not. i figure if i can find where the last page starts, i can then see if there's a number under "coln a" or an alphabet.
i can't count on the fact that the A in coln a on the info page is exactly 6 rows down from ("page: totalPage"OF"totalPage) as the person who inputs this stuff sometimes fudges the rows and it turns out it's only 3 rows down or 7 rows down.
can't just do a search for "A" either as it could appear elsewhere in the form. what do i do???