Link to home
Start Free TrialLog in
Avatar of brothertruffle880
brothertruffle880Flag for United States of America

asked on

Excel 2010 VBA - convert formula in a cell into the value of that formula.

I would like to have VBA code do the following:
1.  edit the current cell (F2).
2.  turn the formula inside that cell into the final value (press F9)
3.  move down to next cell.
4.  If the next cell is empty.  end execution of macro.
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Does this have to be like that?

You can do it without a macro using copy/paste-values.

If if has to be a macro you can have something like

Sub cnv2values()
dim rng as range
set rng=range(selection,selection.end(xldown))
rng.value=rng.value
end sub
Avatar of brothertruffle880

ASKER

Thanks!

How would I add:

Selection.Hyperlinks.Delete

to your code?

I would like the hyper links to be removed from the cells also.
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial