View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Terry Pinnell[_4_] Terry Pinnell[_4_] is offline
external usenet poster
 
Posts: 192
Default Selec same row different column?

I've been trying to make a minor edit to a simple XLM macro which I
wrote many years ago. On running the macro from any cell it should
select the cell in col B of the same row.

FWIW, this shows the worksheet MACROGEN-3.XLM after unhiding it.

https://dl.dropboxusercontent.com/u/...lSameRow-1.jpg

I thought I could now edit it from

GotoColA
=COLUMN(ACTIVE.CELL())
=SELECT("rc["&-(ColA-1)&"]")
=RETURN()

to this

GotoColB
=COLUMN(ACTIVE.CELL())
=SELECT("rc["&-(ColB-1)&"]")
=RETURN()

But, without going into detail, I failed on several counts. So I'll
abandon that; even though many of those old macros appear to work, it
seems pointless to attempt to maintain or edit them.

Could I therefore get some help on a modern VBA macro to do it please?
Which presumably I should insert in PERSONAL.XLS (or PERSONAL.XLSM if
I rename it as I intend.)

--------------------

I did look for a KB shortcut and also tried using the GoTo dialog, but
failed there too.

--
Terry, East Grinstead, UK