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.
Microsoft ExcelVB ScriptVisual Basic.NET
Last Comment
Saqib Husain
8/22/2022 - Mon
Saqib Husain
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
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.
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,select
rng.value=rng.value
end sub