Copy tis into a VBA module so you can read it
Sub NS()
Dim R As Long, LR As Long, S3r
'S3r is sheet3 row x
'Application.ScreenUpdating = False 'makes the macro run
faster by not updating video
'you may want to comment out the above line if you want to
watch the macro run
ActiveSheet.Cells.SpecialCells
(xlCellTypeLastCell).Activate 'Finds the last cell in the
WS so the loop knows when to stop
LR = ActiveCell.Row 'Address of the last row in the WS
Range("A1").Select 'Change A1 to the cell address you want
the loop to start at
S3r = 1
Do
If ActiveCell.Value = 0 And ActiveCell.Value < "" Then
Worksheets("Sheet3").Range("H" & S3r).Value = "Yes" 'put
the value "yes" in cloumn H row x
ActiveCell.Offset(14).Activate 'moves the cursor (active
cell) 14 rows down
R = ActiveCell.Row 'Sets R = to the current row so we can
test if the loop should continue
S3r = S3r + 1
Else
ActiveCell.Offset(14).Activate 'moves the cursor (active
cell) 14 rows down
R = ActiveCell.Row
End If
Loop Until R = LR Or R LR
End Sub
Marty
-----Original Message-----
I would like to use the IF Formula to check the contents
of a cell and
place a "Yes" if true or nothing if False. The standard
formula of IF
(A27=0,"Yes","") doesn't work in VBA because of the
quotation marks for
some reason. How do I do it?
Also, I would like to counter the rows by 14 and place
the result in a
column. In other words, check A27 and place the result
in H1 on
Sheet3. Then check A41 and place the result in H2 and so
on. Thanks.
Tom - you've been a huge help!! I unfortunately learn by
example - I
wish there was a site or reference materials available
that catered to
the very beginner! Thanks again!!
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from
http://www.ExcelForum.com/
.