Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Cell as range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Cell as range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Cell as range

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default Cell as range

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
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
Find Last cell in Range when range is date format default105 Excel Discussion (Misc queries) 5 July 7th 09 03:11 PM
RANGE EXCEL copy cell that meets criteria in a range confused Excel Worksheet Functions 3 March 27th 08 01:41 PM
Referencing a named range based upon Range name entry in cell Barb Reinhardt Excel Worksheet Functions 14 June 20th 07 07:19 PM
Selecting range in list of range names depending on a cell informa Courreges Excel Discussion (Misc queries) 2 June 19th 06 10:59 AM
Range.Find returns cell outside of range when range set to single cell Frank Jones Excel Programming 12 June 10th 04 04:22 AM


All times are GMT +1. The time now is 11:14 AM.

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"