Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having trouble with all the help I'm getting about expanding a range
and I think it has to do with the fact that, when I have selected a single cell, I am assuming that such is a range that can be expanded. Probably, it is not. So, kindly tell me how to expand from a cell location that I have selected to a "range", say by adding five more columns to the right. At that point, I assume, I will have a range and, from there, I think I can figure the rest out myself. Thanks, Grace |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Grace
also a single cell is an Range. try something like the following sub foo() dim rng as range set rng = activesheet.range("B1") rng.resize(1,6) rng.value="myrange" end sub -- Regards Frank Kabel Frankfurt, Germany Grace wrote: I am having trouble with all the help I'm getting about expanding a range and I think it has to do with the fact that, when I have selected a single cell, I am assuming that such is a range that can be expanded. Probably, it is not. So, kindly tell me how to expand from a cell location that I have selected to a "range", say by adding five more columns to the right. At that point, I assume, I will have a range and, from there, I think I can figure the rest out myself. Thanks, Grace |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ActiveCell.Resize(1,5) will be 5 cells in 1 row
ActiveCell.Resize(1,6) will be 6 cells in 1 rows (the original cell and 5 additional cells to the right. If you will have data below that cell that you want to select Range(ActiveCell,ActiveCell.End(xldown)).Resize(,6 ).Printout change the 6 to a 5 if you want a total of 5 columns. -- Regards, Tom Ogilvy "Grace" wrote in message ... I am having trouble with all the help I'm getting about expanding a range and I think it has to do with the fact that, when I have selected a single cell, I am assuming that such is a range that can be expanded. Probably, it is not. So, kindly tell me how to expand from a cell location that I have selected to a "range", say by adding five more columns to the right. At that point, I assume, I will have a range and, from there, I think I can figure the rest out myself. Thanks, Grace |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Tom and Frank!
Grace "Tom Ogilvy" wrote in message ... ActiveCell.Resize(1,5) will be 5 cells in 1 row ActiveCell.Resize(1,6) will be 6 cells in 1 rows (the original cell and 5 additional cells to the right. If you will have data below that cell that you want to select Range(ActiveCell,ActiveCell.End(xldown)).Resize(,6 ).Printout change the 6 to a 5 if you want a total of 5 columns. -- Regards, Tom Ogilvy "Grace" wrote in message ... I am having trouble with all the help I'm getting about expanding a range and I think it has to do with the fact that, when I have selected a single cell, I am assuming that such is a range that can be expanded. Probably, it is not. So, kindly tell me how to expand from a cell location that I have selected to a "range", say by adding five more columns to the right. At that point, I assume, I will have a range and, from there, I think I can figure the rest out myself. Thanks, Grace |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find Last cell in Range when range is date format | Excel Discussion (Misc queries) | |||
RANGE EXCEL copy cell that meets criteria in a range | Excel Worksheet Functions | |||
Referencing a named range based upon Range name entry in cell | Excel Worksheet Functions | |||
Selecting range in list of range names depending on a cell informa | Excel Discussion (Misc queries) | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming |