Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i am recording macros for an excel solution, however, i noticed that when I
arrow right, excel records an absolute reference (ie. Range("B32").Select) of the row. This is not good because the number of rows will always be different. How do I make the selection move to the next cell to the right without absolute reference? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
activecell.offset(0, 1).select
offsets (moves) the acctive cell 1 column to the right -- HTH... Jim Thomlinson "Amil" wrote: i am recording macros for an excel solution, however, i noticed that when I arrow right, excel records an absolute reference (ie. Range("B32").Select) of the row. This is not good because the number of rows will always be different. How do I make the selection move to the next cell to the right without absolute reference? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim gave you the correct answer, but if you had set your recorder to record
relative, it would have given you this: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 08/02/2005 by OGILVTW ' ' ActiveCell.Offset(0, 1).Range("A1").Select End Sub The relative/absolute toggle button is the right button the the two button stop recording toolbar. As you can see, the Range("A1") part is redundant, but is not incorrect. -- Regards, Tom Ogilvy "Amil" wrote in message ... i am recording macros for an excel solution, however, i noticed that when I arrow right, excel records an absolute reference (ie. Range("B32").Select) of the row. This is not good because the number of rows will always be different. How do I make the selection move to the next cell to the right without absolute reference? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The relative/absolute toggle button is the right button the the two button
stop recording toolbar. I thought that this button opens the VBA IDE, silly me. Thank you. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks.
"Jim Thomlinson" wrote: activecell.offset(0, 1).select offsets (moves) the acctive cell 1 column to the right -- HTH... Jim Thomlinson "Amil" wrote: i am recording macros for an excel solution, however, i noticed that when I arrow right, excel records an absolute reference (ie. Range("B32").Select) of the row. This is not good because the number of rows will always be different. How do I make the selection move to the next cell to the right without absolute reference? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 - Macro (VB) code for arrow down & arrow up | Excel Discussion (Misc queries) | |||
Using end-arrow down or end-arrow up in a macro | Excel Discussion (Misc queries) | |||
why dont shift+arrow or ctrl+arrow work in 2007 | Excel Discussion (Misc queries) | |||
How to do the following by pressing the down arrow or up arrow key? | Excel Discussion (Misc queries) | |||
Shift and Arrow Key Code | New Users to Excel |