Thread: If Then ?
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dan R. Dan R. is offline
external usenet poster
 
Posts: 220
Default If Then ?

Here's an example:

Sub Test()
For Each Cell In ActiveSheet.Range("B1:B2")
If Cell.Value = "Test" Then
Cell.Offset(0, -1) = Format(Cell.Offset(0, -1), "$0.00")
End If
Next Cell
End Sub

--
Dan