Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
same varible in formula jheiser57 Excel Worksheet Functions 0 June 21st 10 04:49 PM
varible calculation kinsey New Users to Excel 7 September 30th 07 08:50 AM
varible table not spxer Excel Worksheet Functions 3 August 4th 06 05:13 PM
Unserform with a varible mushy_peas[_30_] Excel Programming 4 April 20th 04 11:06 PM
Varible in a Range mushy_peas[_11_] Excel Programming 3 January 17th 04 02:06 AM


All times are GMT +1. The time now is 09:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"