Macro avoiding circular reference

K

Kanga 85

I need a macro that will do the following:
Take the cell highlighed and the next 29 cells in that row,
Subtract the value of A1 from each of these cells and paste the new value
(not the formula) into the same 30 cells,
Do this only once.

Thanks for any help.
 
J

JE McGimpsey

One way:

Public Sub SubtractA1()
Range("A1").Copy
ActiveCell.Resize(1, 30).PasteSpecial _
Paste:=xlValues, _
Operation:=xlSubtract, _
SkipBlanks:=False, _
Transpose:=False
Application.CutCopyMode = False
End Sub
 
Top