0
votes

I am new creating macros and I usually record them but I'm having problems copying and paste as values to remove the formula from 3 highlighted cells

For example I have a formula on cell B3 C3 & H3 so I would like to highlight only those cells manually and then the macro can remove the formula on each like copy and paste as values on the same cells

I have tried with ActiveCell.Select but that only works for 1 cell not for multiple cells and also the problem is that I need to change to values different cells each day

1

1 Answers

0
votes

Not sure I follow your question exactly but here is what I think your asking for.

You can loop through each cell that is selected and then set the cell value to it's current value which effectively removes all formulas. There are other ways to do this but I think this best answers your specific question.

Sub removeFormula()
    For Each cell In Selection
        cell.Value = cell.Value
    Next cell
End Sub