Changing formulas to values

B

BWPanda

I have a spreadsheet that makes calculations based on the value of another cell
(say, A1).
If I change the value in A1, all the calculations are updated, however, I want
certain cells to keep their values when saved, so that future changes to A1
aren't reflected in these cells.

I can currently do this on a cell-by-cell basis by hitting F2, then F9 on a
cell, but I'm wanting something a bit simpler and that will work when I select a
range of cells.
I've tried saving the F2, F9 presses as a macro, but that doesn't work...

Any ideas?
 
H

Héctor Miguel

hi, !
I have a spreadsheet that makes calculations based on the value of another cell (say, A1).
If I change the value in A1, all the calculations are updated, however
I want certain cells to keep their values when saved, so that future changes to A1 aren't reflected in these cells.
I can currently do this on a cell-by-cell basis by hitting F2, then F9 on a cell
but I'm wanting something a bit simpler and that will work when I select a range of cells.
I've tried saving the F2, F9 presses as a macro, but that doesn't work...

if you have previously selected "the range/s", you could try from vba-editor / immediate window pane:

- if one single and continuous cells range:
selection.value = selection.value

- if two (or more) non-contiguous cells ranges:
for each group in selection.areas: group.value = group.value: next

hth,
hector.
 
B

BWPanda

Héctor Miguel said:
- if one single and continuous cells range:
selection.value = selection.value

Who would've thought it'd be that easy...
Thanks Hector!
 

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