Hello,
I use the below code to change the cell value from positive to negative.
You click the cells you wanna change to negative.
However, I want to adjust it so that if I click on a cell between columns N to W
I want it to change the cells on the same row in column Q and R, not the actual cell you click.
Is this possible?
End If
End Sub
Sub ChangeToNegative()
Dim rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "Kalkyl"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Markera de celler du vill retunera/ta bort:", xTitleId, WorkRng.Address, Type:=8)
Set WorkRng = WorkRng.SpecialCells(xlCellTypeConstants, xlNumbers)
For Each rng In WorkRng
xValue = rng.Value
If xValue > 0 Then
rng.Value = xValue * -1
End If
Next
End Sub
Bookmarks