For | Next ...OR... Do | Loop

  • Thread starter Thread starter aapp81
  • Start date Start date
A

aapp81

i have this code:

Sub CountProducts()

Dim scol As String

LastRow = ActiveSheet.UsedRange.Rows.Count
Range("A" & LastRow + 3).Select
scol = Chr$(ActiveCell.column + 64)
ActiveCell.Formula = "=counta(" & scol & "2:" & scol & _ ActiveCell.Row
- 1 & ")"

End Sub

and what i need is to either loop once from range A : S or just for
each range do the code, then next until range is S...

can anyone show me how please?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top