Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set StartRange and End Range
I am trying to get Excel to select all the cells between Cell A3 and the last
used cell in Column A. Code below: Dim StartCell, EndCell As Range Set StartCell = Range("A3") Set EndCell = Cells(Rows.Count, "A").End(xlUp) Range("StartCell:EndCell").Select What am I doing wrong? Thanks, Ryan--- -- RyGuy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set StartRange and End Range
Sub zeroo()
n = Cells(Rows.Count, "A").End(xlUp).Row Range("A3:A" & n).Select End Sub -- Gary''s Student - gsnu200796 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set StartRange and End Range
Range(StartCell, EndCell).Select
ryguy7272 wrote: I am trying to get Excel to select all the cells between Cell A3 and the last used cell in Column A. Code below: Dim StartCell, EndCell As Range Set StartCell = Range("A3") Set EndCell = Cells(Rows.Count, "A").End(xlUp) Range("StartCell:EndCell").Select What am I doing wrong? Thanks, Ryan--- -- RyGuy -- Dave Peterson |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set StartRange and End Range
The logic is sound for both subs!!
Thanks GS and thanks DP!!!! Ryan--- -- RyGuy "Dave Peterson" wrote: Range(StartCell, EndCell).Select ryguy7272 wrote: I am trying to get Excel to select all the cells between Cell A3 and the last used cell in Column A. Code below: Dim StartCell, EndCell As Range Set StartCell = Range("A3") Set EndCell = Cells(Rows.Count, "A").End(xlUp) Range("StartCell:EndCell").Select What am I doing wrong? Thanks, Ryan--- -- RyGuy -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
Excel Addin:Setting the range to the Excel.Range object range prop | Excel Worksheet Functions | |||
Range Question / error 1004: method Range of object Worksheet has failed | Excel Programming | |||
Range.Find returns cell outside of range when range set to single cell | Excel Programming | |||
how to? set my range= my UDF argument (range vs. value in range) [advanced?] | Excel Programming |