LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Creating named ranges automatically

Dear Experts:

I wonder whether the following is possible using VBA:

1. Search for the word 'Sales' on the current worksheet
2. If found then the following action has to be performed (This has
been recorded using the macro recorder)
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
3. The range has to be named 'range1'
4. The macro goes on searching for all instances of 'Sales', repeating
the named range creation as described under Point 2 and the 3
5. the range name's number is to be incremented by 1, i.e. range1,
range2, range3 etc.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas
 
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
Creating dynamic ranges which are named. U0107 Excel Worksheet Functions 1 January 5th 10 11:46 PM
Creating Named Ranges with VBA Barb Reinhardt Excel Programming 5 August 3rd 06 09:48 PM
Creating Named Ranges with VBA Barb Reinhardt Excel Programming 1 August 3rd 06 05:58 PM
Creating dymnamic named ranges John Baker Excel Programming 6 December 4th 03 02:05 PM
Creating Named Ranges in VBA Mark D'Agosta Excel Programming 4 October 4th 03 06:15 AM


All times are GMT +1. The time now is 06:27 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"