Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
select cell
My objective is : select a range of cells from A1 to {cell}. {cell} is a
variable that my cursor stays. For example, if my cursor stop at cell h13, the macro will select a1..h13. If my cursor stop at cell h26, the macro will select a1..h26. Is it possible to have this kind of coding? Range("A1:{cell}").Select How can I substitute the selected cell's name into {cell}? Please advise |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
select cell
Sub Macro1() ' ' Macro1 Macro ' Macro recorded 3/14/2006 by Dave ' ' Range("A1:H13").Select End Sub or Sub Macro2() ' ' Macro2 Macro ' Macro recorded 3/14/2006 by Dave ' Range("A1").Select Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select End Sub this starts at A1 and Ends at your last cell -- davesexcel ------------------------------------------------------------------------ davesexcel's Profile: http://www.excelforum.com/member.php...o&userid=31708 View this thread: http://www.excelforum.com/showthread...hreadid=522331 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
select cell
do you mean the activecell, the cell the cursor is in?
Range("A1:" & ActiveCell.Address).Select -- Gary "Anna" wrote in message ... My objective is : select a range of cells from A1 to {cell}. {cell} is a variable that my cursor stays. For example, if my cursor stop at cell h13, the macro will select a1..h13. If my cursor stop at cell h26, the macro will select a1..h26. Is it possible to have this kind of coding? Range("A1:{cell}").Select How can I substitute the selected cell's name into {cell}? Please advise |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
select cell
Range("A1",ActiveCell).Select
-- Regards, Tom Ogilvy "Anna" wrote in message ... My objective is : select a range of cells from A1 to {cell}. {cell} is a variable that my cursor stays. For example, if my cursor stop at cell h13, the macro will select a1..h13. If my cursor stop at cell h26, the macro will select a1..h26. Is it possible to have this kind of coding? Range("A1:{cell}").Select How can I substitute the selected cell's name into {cell}? Please advise |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA: Column Select then Data Select then return to cell A1 | Excel Discussion (Misc queries) | |||
Using formulas to select cells (Ex: Select every nth cell in a col | Excel Discussion (Misc queries) | |||
How to point to (select) a cell to the left from a cell where I enter the = equal sign? | Excel Discussion (Misc queries) | |||
Select cell, Copy it, Paste it, Return to Previous cell | Excel Discussion (Misc queries) | |||
Select First Active Cell if the cell is in a pivot table | Excel Programming |