cubiclemonkey
New Member
- Joined
- Mar 7, 2012
- Messages
- 25
Good afternoon,
Is there a way to create a range based off of an inputbox that can be used within the following macro. I would like to replace the stipulate range of "K3:K2455" with an input for a starting cell and ending cell.
Is there a way to create a range based off of an inputbox that can be used within the following macro. I would like to replace the stipulate range of "K3:K2455" with an input for a starting cell and ending cell.
VBA Code:
Sub SorH()
Dim Amount As Object
For Each Amount In Range("K3:K2455")
If Amount > 0 Then
Amount.Offset(0, -1).value = "S"
ElseIf Amount < 0 Then
Amount.Offset(0, -1).value = "H"
Else
Amount.Offset(0, -1).value = ""
End If
Next Amount
End Sub