I need to display values in thousands in a worksheet, i do this often so wanted to be able to select multiple ranges and then run the macro. I have done some, but my problem is selecting the next cell in the selected range.
Heres my code. Any other suggestions are welcome
Sub Thousands()
Dim starts As String
Dim formula As String
Dim first As Boolean
Dim cellOne As String
Do While cellOne <> ActiveCell.Address
cellOne = ActiveCell.Address
starts = Left(ActiveCell.FormulaR1C1, 1)
If starts = "=" Or starts = "+" Or starts = "-" Then
formula = ActiveCell.formula & "/1000" '.FormulaR1C1
Else
formula = "=" & ActiveCell.formula & "/1000"
End If
If MsgBox("Update " & vbCrLf & ActiveCell.formula & vbCrLf & "to:" & vbCrLf
& formula, vbYesNo, "Do you want to update formula?") = vbYes Then
If starts = "=" Or starts = "+" Or starts = "-" Then
ActiveCell.FormulaR1C1 = ActiveCell.formula & "/1000"
Else
ActiveCell.FormulaR1C1 = "=" & ActiveCell.formula & "/1000"
End If
End If
ActiveCell.Offset(1, 0).Select 'THIS DONT WORK
Loop
End Sub