Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
finalrow question
i am using the following bit of code for a macro i am putting together:
Sheets("KPI").Select Range("A2").Select FinalRow = Range("A65536").End(xlUp).Row Range("A2" & FinalRow).Select at present (varies daily), column a on this sheet has data in cells a2:a132...when i execute this portion of code, cell A2132 is selected instead of a2 through the last row. i tried clearing contents and deleting all cells from a133:iv65536, executed again, and still the same result. what would cause this problem to occur? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
finalrow question
Try
Sheets("KPI").Select FinalRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row Range("A2:A" & FinalRow).Select Mike "joemeshuggah" wrote: i am using the following bit of code for a macro i am putting together: Sheets("KPI").Select Range("A2").Select FinalRow = Range("A65536").End(xlUp).Row Range("A2" & FinalRow).Select at present (varies daily), column a on this sheet has data in cells a2:a132...when i execute this portion of code, cell A2132 is selected instead of a2 through the last row. i tried clearing contents and deleting all cells from a133:iv65536, executed again, and still the same result. what would cause this problem to occur? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
finalrow question
Worked perfectly!!! Thank you so much!!!
"Mike H" wrote: Try Sheets("KPI").Select FinalRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row Range("A2:A" & FinalRow).Select Mike "joemeshuggah" wrote: i am using the following bit of code for a macro i am putting together: Sheets("KPI").Select Range("A2").Select FinalRow = Range("A65536").End(xlUp).Row Range("A2" & FinalRow).Select at present (varies daily), column a on this sheet has data in cells a2:a132...when i execute this portion of code, cell A2132 is selected instead of a2 through the last row. i tried clearing contents and deleting all cells from a133:iv65536, executed again, and still the same result. what would cause this problem to occur? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|