Thread: If Statement
View Single Post
  #2   Report Post  
merlin
 
Posts: n/a
Default


"randy_tn" schreef in bericht
...

I am needing to have a macro look at a Cell and (B8) and determine if it
has a value greater than 0. IF it does I need it to copy the contents
to another cell (M8) then move down 4 cells. IF the value is "======"
then I am done.

Can somone PLEASE help me with this?


--
randy_tn
------------------------------------------------------------------------
randy_tn's Profile:

http://www.excelforum.com/member.php...o&userid=16001
View this thread: http://www.excelforum.com/showthread...hreadid=274679


Public Sub Test()
Dim wb As Workbook, ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.ActiveSheet
ws.Cells(8, 2).Select
If Val(Selection) 0 Then
ws.Cells(8, 13).Value = Selection
End If
ws.Cells(12, 2).Select
If Selection = "======" Then
'You're done
Exit Sub
Else
'Code here
End If
End Sub