FOR EACH

  • Thread starter Thread starter GREGORY
  • Start date Start date
G

GREGORY

hello

i would like to loop some code for sheets 3 to 17 of a
workbook, but I'm not really sure of the syntax? Any ideas?
 
Greg,

Try something like

Dim Ndx As Long
Dim WS As Worksheet
For Ndx = 3 To 17
Set WS = Worksheets(Ndx)
' do something with WS
Next Ndx

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

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