Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell range
Hi, all:
I need to define a cell range which always starts with cell A3 and have a known number of cells. For example, if I know the number of cells to be included in this cell range is 5, the cell range will be A3:A8. and if I know the number of cells to be included in this cell range is 10, then the cell range will be A3:A13. I do not want to exclude blank cells within the cell range. Please advise, Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell range
On May 29, 1:25*pm, George wrote:
Hi, all: I need to define a cell range which always starts with cell A3 and have a known number of cells. For example, if I know the number of cells to be included in this cell range is 5, the cell range will be A3:A8. and if I know the number of cells to be included in this cell range is 10, then the cell range will be A3:A13. I do not want to exclude blank cells within the cell range. Please advise, Thanks Sub oneWay() Dim num As Integer num = 5 Range("A3").Resize(num + 1).Select End Sub |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell range
JW:
Thanks. Is there anyway I can insert this as a Name? Excel Menu Bar\Insert\Name \Define I appreciate |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell range
Hi
Dim TargetRange As Range Dim num As Integer num = 5 set TargetRange=Range("A3").Resize(num + 1) ActiveWorkbook.Names.Add Name:="MyName", RefersTo :=TargetRange Regards, Per "George" skrev i meddelelsen ... JW: Thanks. Is there anyway I can insert this as a Name? Excel Menu Bar\Insert\Name \Define I appreciate |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell range
Jessen:
It is perfect. Thank you so much for your help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON | Excel Programming | |||
loop through cells in a range and pick up corresponding cell values in another range | Excel Programming | |||
Selecting range in list of range names depending on a cell informa | Excel Discussion (Misc queries) | |||
Change cell colour for a cell or range within a predefined range | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming |