PC Review


Reply
 
 
George
Guest
Posts: n/a
 
      29th May 2008
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
 
Reply With Quote
 
 
 
 
JW
Guest
Posts: n/a
 
      29th May 2008
On May 29, 1:25*pm, George <dz...@yahoo.com> 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
 
Reply With Quote
 
George
Guest
Posts: n/a
 
      29th May 2008
JW:

Thanks.

Is there anyway I can insert this as a Name? Excel Menu Bar\Insert\Name
\Define

I appreciate
 
Reply With Quote
 
Per Jessen
Guest
Posts: n/a
 
      29th May 2008
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" <(E-Mail Removed)> skrev i meddelelsen
news:76951b94-6ac9-4072-baeb-(E-Mail Removed)...
> JW:
>
> Thanks.
>
> Is there anyway I can insert this as a Name? Excel Menu Bar\Insert\Name
> \Define
>
> I appreciate


 
Reply With Quote
 
George
Guest
Posts: n/a
 
      29th May 2008
Jessen:

It is perfect. Thank you so much for your help!

 
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
HELP W/ VBA: SELECT RANGE, ALLCAPS, CELL COLOR, RETURN TO BLANK CELL/PATTERN CELL extremejobtvshow@gmail.com Microsoft Excel Programming 5 28th Jun 2008 07:49 PM
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON CAPTGNVR Microsoft Excel Programming 2 8th Jul 2007 04:18 PM
How to check if each value in a cell range is contained in a second cell range? ModelerGirl Microsoft Excel Discussion 3 31st Jan 2006 12:28 PM
Change cell colour for a cell or range within a predefined range =?Utf-8?B?TWFydGlu?= Microsoft Excel Programming 2 23rd May 2005 06:16 PM
Range.Find returns cell outside of range when range set to single cell Frank Jones Microsoft Excel Programming 12 10th Jun 2004 04:22 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:54 AM.