View Single Post
 
Old 06-27-2019, 06:03 PM
p45cal's Avatar
p45cal p45cal is offline Windows 10 Office 2016
Expert
 
Join Date: Apr 2014
Posts: 947
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Another way: Create a new sheet and call it bleugh. In its cell A1 enter 6, and in cell B1 enter -1

Then go to your sheet with the cells that want changing, select the cells and run:
Code:
Sub blah()
    Selection.SpecialCells(xlCellTypeConstants, 1).Select' selects only plain numbers within your selection.
    Sheets("bleugh").Range("A1").Copy '6
    Selection.PasteSpecial Operation:=xlSubtract
    Sheets("bleugh").Range("B1").Copy '-1
    Selection.PasteSpecial Operation:=xlMultiply
End Sub
Reply With Quote