Run Loop other than the selected sheets

suresh7860

New Member
Joined
Jul 18, 2015
Messages
48
Hi Experts

I am new here and trying to learn things by looking at experts and need your help to get my code corrected.

I have created a vba code using loop - For / next code which is working fine when i use only one sheet name which doesn't need to get summarized like below:

For Each w In Worksheets
If w.Name <> "Summary" Then

With w

My code
End WITH
Next

but when i am trying to use array with sheet names which is not required to summarize. I am getting error when i am writing the code using array itself, it looks very silly but i almost spend 8 days to find out what i am doing wrong, would be great help if any of your correct me with this:

Code used

For Each w In Worksheets

If w.Name <> Array("Summary", "Not Certified", "STAT Reconciliations", "Blank Account#", "Blank Description", "Blank Line#", "Blank Reference", "Prepd Rec's-Unidentified Bal>1", "Preparere Unassigned", "Approver Unassigned", "Reviewer Unassigned", "Acct Reviewer Unassigned", "Acct Owner Unassigned", "Key should be Non-Key", "Non-Key should be Key", "Blank Risk Rating", "Timelines", "Recon WorkFlow") Then

With w

My code
End WITH
Next

Would be helpful if anyone can fix this!

Thanks a lot and have a great weekend for all of you
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,215,324
Messages
6,124,250
Members
449,149
Latest member
mwdbActuary

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top