Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
What Cell am I in?
I would like to write a macro that will move x number of cells to the right
from whatever cell (or range) my cursor is currently in. Example: if I highlight a range of A20:E20, i would like the macro to move 2 cells to the right (in this case to G20) and type "X". if I highlight a range of A15:E15, I would like the macro to move 2 cells to the right (in this case to G15). Thanks (in advance) for your help -- this site is a big help to me. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
What Cell am I in?
Try this out:
activecell.offset(o,2).select activecell.value="x" Is this what you are looking to do? -- David =Sub Let_me_ macronize_that_for_you!() msgbox("Poof, it''''s done.") End Sub "BK523" wrote: I would like to write a macro that will move x number of cells to the right from whatever cell (or range) my cursor is currently in. Example: if I highlight a range of A20:E20, i would like the macro to move 2 cells to the right (in this case to G20) and type "X". if I highlight a range of A15:E15, I would like the macro to move 2 cells to the right (in this case to G15). Thanks (in advance) for your help -- this site is a big help to me. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
What Cell am I in?
EXCELLENT! - That is JUST what I wanted to do.
Thanks again. "DStrong" wrote: Try this out: activecell.offset(o,2).select activecell.value="x" Is this what you are looking to do? -- David =Sub Let_me_ macronize_that_for_you!() msgbox("Poof, it''''s done.") End Sub "BK523" wrote: I would like to write a macro that will move x number of cells to the right from whatever cell (or range) my cursor is currently in. Example: if I highlight a range of A20:E20, i would like the macro to move 2 cells to the right (in this case to G20) and type "X". if I highlight a range of A15:E15, I would like the macro to move 2 cells to the right (in this case to G15). Thanks (in advance) for your help -- this site is a big help to me. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
What Cell am I in?
Will this do?
Selection.End(xlToRight).Offset(, 2).value="X" 'Select -- Don Guillett Microsoft MVP Excel SalesAid Software "BK523" wrote in message ... I would like to write a macro that will move x number of cells to the right from whatever cell (or range) my cursor is currently in. Example: if I highlight a range of A20:E20, i would like the macro to move 2 cells to the right (in this case to G20) and type "X". if I highlight a range of A15:E15, I would like the macro to move 2 cells to the right (in this case to G15). Thanks (in advance) for your help -- this site is a big help to me. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 | Excel Worksheet Functions | |||
How can I copy a value from a cell and paste it into another cell while adding it to the previous value in that cell | Excel Worksheet Functions | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) | |||
Cell Formula reference to cell Based On third Cell Content | Excel Discussion (Misc queries) |