View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
tlee tlee is offline
external usenet poster
 
Posts: 17
Default How to Check cell column A and add 1 to cell of column D by using


Hi Mike,

Thanks for your message and help !!!

tlee


Maybe this

Sub Marine()
Dim MyRange As Range
Lastrow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
Set MyRange = Range("A1:A" & Lastrow)
For Each c In MyRange
If c.Value < "" Then
c.Offset(, 3).Value = c.Offset(, 3).Value + 1
End If
Next
End Sub

Mike

"tlee" wrote:

Dear all,

Could anyone help how do I loop to check cells of column A if there is
not
empty, then add 1 to cell of column D and stop until the cell of column A
is
empty?

Thanks for your help.

tlee