Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
BLW BLW is offline
external usenet poster
 
Posts: 6
Default Macro - move active cell to another column; same row

I am writing a macro where it starts off with a (startrow) reference that is
a value in an active cell. The macro inserts new rows and formatings. At
the end I want it to enter a value into the cell two columns to the right of
the (startrow). I am having trouble getting it to select the right cell - it
keeps selecting the (startrow) cell and changing that value.

How do I get it to move to another column with only specifying how many
columns over to move and not an exact column.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 421
Default Macro - move active cell to another column; same row

Hi BlW,

Try using the Range's Offset property.

For example, try someting like:

Dim myVal as Long

myVal =20

Range(StartCell).Offset(0,2).Value = myVal



---
Regards.
Norman


"BLW" wrote in message
...
I am writing a macro where it starts off with a (startrow) reference that
is
a value in an active cell. The macro inserts new rows and formatings. At
the end I want it to enter a value into the cell two columns to the right
of
the (startrow). I am having trouble getting it to select the right cell -
it
keeps selecting the (startrow) cell and changing that value.

How do I get it to move to another column with only specifying how many
columns over to move and not an exact column.



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
move from active cell offset in macro april Excel Discussion (Misc queries) 5 October 18th 09 05:02 PM
Filter Macro that can work for any column/active cell ddate Excel Programming 3 December 7th 07 02:27 AM
macro- move down to empty cell & active worksheet EducatingMom Excel Worksheet Functions 3 August 4th 06 11:02 PM
how do find out the column of the active cell in a macro? Neill Lee Excel Programming 4 April 20th 05 09:45 PM
Move to Active Row Column B scrabtree23[_3_] Excel Programming 2 November 20th 04 01:25 PM


All times are GMT +1. The time now is 02:18 PM.

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"