Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Range naming cells with blank cells through coding
Hi,
Through macro, how do I name a range which consists of blank cells in between. The range will be derived dynamically, where only the starting cell is known. For example, Range starts frm A5, and end cell should be selected dynamically based on the data. In between the dynamic range there may be some blank cells. How to I code? Thanks in advance |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Range naming cells with blank cells through coding
The following will create a Named range of the empty cells below A5 until a
non-empty cell is found: Sub servient() Set a5 = Range("A5") s = "=Sheet1!$A$6:$A$" & a5.End(xlDown).Row - 1 ActiveWorkbook.Names.Add Name:="bigji", RefersTo:=s End Sub -- Gary''s Student - gsnu200776 "Naveen J V" wrote: Hi, Through macro, how do I name a range which consists of blank cells in between. The range will be derived dynamically, where only the starting cell is known. For example, Range starts frm A5, and end cell should be selected dynamically based on the data. In between the dynamic range there may be some blank cells. How to I code? Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
If certain cells not blank, and cells in range are, set values to | Excel Discussion (Misc queries) | |||
Maximum Number of Blank Cells between Non Blank Cells in a Range | Excel Worksheet Functions | |||
Naming a non-blank range from a col containing non-consec. blank c | Excel Worksheet Functions | |||
Will excel add cells using colour coding eg Add all red cells | Excel Discussion (Misc queries) | |||
How do I skip blank cells when copying over a range of cells? | Excel Discussion (Misc queries) |