Macro to change formula?

V

Victor Delta

In a series of cells (in an Excel 2002 worksheet), I have a long formula of
the type '=IF(xxxxxxxxxxxxxxxxx,xxxxxxxx,cell ref)' - the functions are
unimportant. The cell ref is usually something like T89 (i.e. three
characters) but could possibly go up to, say, AA101.

I frequently need to change the formula to simply '=cell ref'.

Would it be possible for a macro to automate this process please?

V
 
V

Victor Delta

Victor Delta said:
In a series of cells (in an Excel 2002 worksheet), I have a long formula
of the type '=IF(xxxxxxxxxxxxxxxxx,xxxxxxxx,cell ref)' - the functions are
unimportant. The cell ref is usually something like T89 (i.e. three
characters) but could possibly go up to, say, AA101.

I frequently need to change the formula to simply '=cell ref'.

Would it be possible for a macro to automate this process please?

Just thought, the cell ref is actually that of 2 cells to the left i.e. in
V89 you would find the formula ending in T89. That might be an easier way on
which to base the macro.

V
 
D

Don Guillett Excel MVP

Just thought, the cell ref is actually that of 2 cells to the left i.e. in
V89 you would find the formula ending in T89. That might be an easier wayon
which to base the macro.

V

Record a macro while doing a EDIT Replace. Then clean it up and apply
only to specialcells with formulas.
 
V

Victor Delta

Just thought, the cell ref is actually that of 2 cells to the left i.e. in
V89 you would find the formula ending in T89. That might be an easier way
on
which to base the macro.

V

Record a macro while doing a EDIT Replace. Then clean it up and apply
only to specialcells with formulas.

Thanks, sorted.

V
 
V

Victor Delta

message


Thanks, sorted.

V- Hide quoted text -

- Show quoted text -
For archival purposes you need to post the solution used for others

I simply recorded a macro with the following contents:

ActiveCell.FormulaR1C1 = "=RC[-2]"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top