View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Joe Fish Joe Fish is offline
external usenet poster
 
Posts: 24
Default If Then not working

Hi,
In the following block of code, a variable is compared to the active
cell, and then either of two macros run, and it loops. Not matter what
happens, though, only the macro "CreateHomeRun" runs. "CreateJumper"
never runs.
Any ideas?
Thanks,
Joe

Dim CellAbove As Range
Set CellAbove = ActiveCell.Offset(-1, 0)

Do Until ActiveCell = ""
If ActiveCell = CellAbove Then
CreateJumper
Else: CreateHomeRun
End If
Loop