View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default MACRO TO EDIT CELL FORMULA !!

there is no built in support for anything like this. You would need to
parse out the row number, increment it by 1, then append it to the remainder
of the formula. If the formula didn't pertain to another worksheet, you
might be able to use directprecedents, but you example appears to point to
another worksheet. (you might be able to cobble together something using the
xl4 macro equivalent to trace arrow).

--
Regards,
Tom Ogilvy

"jay dean" wrote in message
...

Please help. This thing is driving me nuts !!
I need a macro that will paste an altered copy of a cell formula into
another cell.

Example -
cell B10 contains ='SheetX'!K22
When I copy and paste its formula in any cell, say D6, cell D6 should
contain='SheetX'!K23

Another example -
say cell F4 contains='SheetX'!P10
When I copy and paste that formula in any cell, like J5, cell J5 should
contain='SheetX'!P11

I have lots of cell formulas to change the row portion of their
formulas just by 1 and doing this manually is painful and tedious.
Please help with a code. Thanks in advance!!
Jay Dean
you
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!