LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Variable range question


ok..... lets see that didn't do what i needed it too.... let me explain
more.....

in colomn A i have a list of names that changes from day to day that
list starts on cell A4 at the end of the list of names i have 3 cells
one called (This Weeks Total), (Last Weeks Total), and (Difference)

the number of names changes from week to week and i need to be able to
select just the names in that colomn only to copy to several other
sheets. i have the copy code written with no problem but i cant get it
to select just the names in the list only ..... so if you could help i
would be greatful


JMB Wrote:
Two examples - which one you want depends on what gaps may exist in
your
data. If it looks like this

1
2

3
4

x
x
x

and you wanted to select cells 1 through 4 (I'm assuming Column A, the
x's
are the static rows I assume you want excluded) then:

Sub test()
With Sheets("Sheet1")
.Range("A1", .Cells(.Rows.Count, _
1).End(xlUp).End(xlUp).End(xlUp)).Select
End With
End Sub

Or, if there are no spaces in your data, you could start at the top and
go
down, so

1
2
3
4

x
x
x


Sub Test2()
With Sheets("Sheet1")
.Range("A1", _
.Range("A1").End(xlDown)).Select
End With
End Sub

"papadoc" wrote:


i am attempting to copy a select range of cells that the bottom of

the
range of cells changes from one sheet to several sheets. i also

have
three cells that are static at the bottom of the colomn that do not
need to be copied. i know it is simple but for some reason i can't

seem
to figure it out. any help would be greatly appericated.


--
papadoc

------------------------------------------------------------------------
papadoc's Profile:

http://www.excelforum.com/member.php...o&userid=36463
View this thread:

http://www.excelforum.com/showthread...hreadid=562268




--
papadoc
------------------------------------------------------------------------
papadoc's Profile: http://www.excelforum.com/member.php...o&userid=36463
View this thread: http://www.excelforum.com/showthread...hreadid=562268

 
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
select range and put range address in variable [email protected] Excel Programming 2 January 25th 06 01:28 AM
variable question Gary Keramidas Excel Programming 8 November 16th 05 04:28 PM
Macro to copy a specified range to a variable range SWT Excel Programming 4 October 21st 05 08:24 PM
setting a range variable equal to the value of a string variable Pilgrim Excel Programming 2 July 1st 04 11:32 PM
Problem trying to us a range variable as an array variable TBA[_2_] Excel Programming 4 September 27th 03 02:56 PM


All times are GMT +1. The time now is 09:16 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"