Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA - Varible number rows
Hello
I am using Ctl F to find end ( marked by = ) of a block of rows in spread sheet. I then use CTL HOME to select from the end to beginning. I want to use this command as a macro. The blocks have a variable number of rows ranging 6 to 20 rows. However when I run as macro it fails when the number of rows in th block changes. Any ideas to solve would be appreciated. Loui -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA - Varible number rows
Hi
you may post your existing macro and describe what you're trying to achieve. In most cases there's no need for selecting a range -- Regards Frank Kabel Frankfurt, Germany Hello I am using Ctl F to find end ( marked by = ) of a block of rows in a spread sheet. I then use CTL HOME to select from the end to beginning. I want to use this command as a macro. The blocks have a variable number of rows ranging 6 to 20 rows. However when I run as macro it fails when the number of rows in the block changes. Any ideas to solve would be appreciated. Louis --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Excel VBA - Varible number rows
Ctrl+Home goes to A1 for me
Dim rng as Range set rng = Range(Range("A1"),Cells.find("=")) rng.Select Another possibility Dim rng as Range set rng = cells.find("=") rng.CurrentRegion.Select -- Regards, Tom Ogilvy "louismx " wrote in message ... Hello I am using Ctl F to find end ( marked by = ) of a block of rows in a spread sheet. I then use CTL HOME to select from the end to beginning. I want to use this command as a macro. The blocks have a variable number of rows ranging 6 to 20 rows. However when I run as macro it fails when the number of rows in the block changes. Any ideas to solve would be appreciated. Louis --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
same varible in formula | Excel Worksheet Functions | |||
varible calculation | New Users to Excel | |||
varible table not | Excel Worksheet Functions | |||
Unserform with a varible | Excel Programming | |||
Varible in a Range | Excel Programming |