LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mo2 Mo2 is offline
external usenet poster
 
Posts: 34
Default need macro to edit formula...

this is difficult to explain, but here goes nothing...

here's my sample formula, in Cell G25:
=IF(D25=0,0,IF(D45=0,0,B45))

This is what i want the macro to do:
Step1: read the number in cell A1. (lets say i type "2" in there)

Step2: Add "2" to every cell reference in G25's formula, except the
reference that refers to the current cell's row (in this case, row 25).

I.E. this would change G25's formula from: =IF(D25=0,0,IF(D47=0,0,B47))
to:
=IF(D25=0,0,IF(D47=0,0,B47))

STEP3: copy the new formula down for 20 rows.

I need this same thing to happen, if i type a number in A2
(except this time, it would be looking at the formula in I25
and following the same steps.
I25's formula is : =IF(D25=0,0,IF(D44=0,0,B44))


can anybody help me please?
if this can be done through some sort of pop up (which startup as soon as i
open the worksheet), instead of typing a number in a cell, even better. but
either way will work for me:)

thanks in advance
 
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
Macro to edit formula Tang123 Excel Discussion (Misc queries) 2 October 6th 05 08:33 PM
Macro to edit a formula. jimwood Excel Programming 1 June 15th 05 03:27 PM
MACRO TO EDIT CELL FORMULA !! jay dean Excel Programming 3 July 10th 04 04:05 PM
macro to edit formula steve Excel Programming 0 August 20th 03 11:45 PM
macro to edit formula Steve d'Apollonia Excel Programming 4 August 20th 03 09:41 PM


All times are GMT +1. The time now is 11:15 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"