Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Create named ranges in Column on worksheet

Hello Excel Experts,

I have a worksheet that I need to create named ranges, or at least get
the addresses for.

The data occurs in a single column, separated by blank cells. It
could be 1 or 2 or 3 blank rows (or more I suppose) between the cells
with data.

I would like to avoid counting all the rows, in a for loop, and
looking for empty cells, etc.

I have looked around this newsgroup and found some helpful code:

Cells(Range("a:a").End(xlDown).Row + 1, 1).Select

This selects the first empty cell in my column. I can get the address
of the selection, and backup one row to define the range address
(a1:a13 for example).

Then I still need to move down in the worksheet, this time ignoring
the blank rows,
and starting from the next row with data, and moving down to the row
just above the empty cell ... hence a new range i.e. a17:a27, etc. I
would like to continue this process until there are no more rows (in
the same column) with data.

any ideas on how to do this using the range object, etc.

Thanks,

eholz1
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
Named Ranges in Excel (update and create) Ixtreme Excel Discussion (Misc queries) 2 June 17th 09 03:23 PM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
Create list of Named Ranges Jim Tibbetts Excel Worksheet Functions 4 February 15th 07 05:29 PM
Create named ranges loopoo[_25_] Excel Programming 2 December 22nd 05 01:16 PM
Using VB to to create named ranges PC[_3_] Excel Programming 7 May 19th 05 10:57 AM


All times are GMT +1. The time now is 01:21 PM.

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"