PC Review


Reply
Thread Tools Rate Thread

Create named ranges in Column on worksheet

 
 
eholz1
Guest
Posts: n/a
 
      24th Jan 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Worksheet with Named Ranges KC Rippstein hotmail com> Microsoft Excel Programming 2 7th Jun 2008 06:04 AM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Microsoft Excel Programming 3 24th Dec 2007 01:15 PM
Multiple worksheet named ranges to PDF Cresta Microsoft Excel Programming 0 3rd Dec 2007 03:36 PM
Using worksheet templates with named ranges Jeremy Microsoft Excel Programming 1 13th Jan 2007 04:05 PM
Named Ranges not available in every worksheet Microsoft Excel Misc 2 7th May 2004 02:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:05 AM.