#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default 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.


Reply
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
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 [email protected] Excel Worksheet Functions 1 August 22nd 08 02:04 AM
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 [email protected] Excel Worksheet Functions 2 November 7th 07 09:39 AM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 1 February 11th 05 06:36 AM
Cell Formula reference to cell Based On third Cell Content Gabriel Excel Discussion (Misc queries) 0 February 11th 05 05:35 AM


All times are GMT +1. The time now is 05:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"