Ignore sheet in loop

cuetipper

Board Regular
Joined
Nov 9, 2018
Messages
67
So how do I ignore the worksheet named "Data".

For Each ws In Sheets
if ws.name="Data" next ws end if
else
'do stuff here
next ws
 
So i would like a loop to ignore several sheets if they exist. I tried the code below but it is only ignoring summary. How can I get them both to be ignored if they exist?

For Each WS In Application.Worksheets
WS.Activate
If WS.Name <> "Summary" Then GoTo cyl
If WS.Name <> "Open Vendor Jobs" Then GoTo cyl

cyl:
rest of my code here
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
The same way I showed in post#6
 
Upvote 0
I tried that but it did not work. Thought maybe it was looking for "BOTH" because of the and statement. The wb sometimes has on or the other or both.
 
Upvote 0
I re tried it and still get errors. It tells me next without for and highlights the next at the end of my code, If I remove the line the code runs without error. Any idea why?



'Email Section
For Each WS In Application.Worksheets
WS.Activate
If WS.Name <> "Summary" And WS.Name <> "Open Vendor Jobs" Then
'Get Recipient
sal = Range("N2")
VND = Range("G2")
' Create top lines of the email body
 
Upvote 0
Its quite long, but here is the effected section, Thanks


Code:
For Each WS In Application.Worksheets
    WS.Activate
   ' If WS.Name = "Summary"
   ' If WS.Name = "Open Vendor Jobs"
'Get Recipient
    sal = Range("N2")
    VND = Range("G2")
' Create top lines of the email body
    sHtmlHeader = VND & "," _
    & vbLf & vbLf _
    & "Below you will see a current summary of your job(s) that appear to be open and have not satisfied City’s response and/or completion requirements." _
    & vbLf _
    & "If these jobs are actually completed, please return to the worksite as soon as possible to finalize the job close-out process in Mercury." _
    & vbLf _
    & "For all jobs still in progress, please ensure the latest update is added into Mercury." _
    & vbLf _
    & "If for any reason you cannot complete these jobs, please respond with the issue you're encountering so we can help. " _
    & vbLf _
    & vbLf & vbLf _
    & "As an FYI, City’s priorities are listed below. Please make all attempts to meet these requirements as they directly impact Walmart store operations. " _
    & vbLf _
    & "*  P1 – 4 Hour Response, Completed in 4 Days." _
    & vbLf _
    & "*  P2 – 24 Hour Response, Completed in 7 Days." _
    & vbLf _
    & "*  P3 - 7 Day Response, Completed in 21 Days." _
    & vbLf _
    & vbLf & vbLf _
    & "We appreciate your continued partnership in servicing Walmart." _
    & vbLf _
    & "If you have any questions or concerns please contact us at [EMAIL="wmtsubcontractors@cfm-us.com"]wmtsubcontractors@cfm-us.com[/EMAIL]. " _
    & vbLf & vbLf
    sHtmlHeader = Replace(sHtmlHeader, vbLf, Chr(60) & "br" & Chr(62))
'User setting, change to suit
    Const FontName = "Arial"
    Const FontSize = 10
    Const Behalf = "************************ ' <-- Name to send on behalf of Exchange profile/account
    Dim objOutlookApp As Object
    Dim IsOutlookCreated As Boolean
    Dim sFont As String, sText As String, sTempHTMLFile As String
' Set font of html-body (parentheses are just because of MrExcel posting limitation)
    sFont = "(body font: " & FontSize & "pt " & FontName & ";color:black"")(/p)"
    sFont = Replace(sFont, "(", Chr(60))
    sFont = Replace(sFont, ")", Chr(62))
'Copy range     Application.CutCopyMode = False
    LR = Range("A1").End(xlDown).Row
    ActiveSheet.Range("A1:M" & LR).Copy
' Get HTML data
    sTempHTMLFile = Environ("Temp") & "\Temp_for_Excel" & Format(Now, "YYYYMMDD_hhmmssms") & ".htm"
    With Workbooks.Add(xlWBATWorksheet)
' Paste data special
    With .Sheets(1).Cells(1)
    .PasteSpecial xlPasteValues
    .PasteSpecial xlPasteColumnWidths
    .PasteSpecial xlPasteFormats
    End With
    Application.CutCopyMode = False
' Publish HTML file data
    With .PublishObjects.Add(xlSourceRange, sTempHTMLFile, .Sheets(1).Name, .Sheets(1).UsedRange.Address, xlHtmlStatic)
    .Publish True
    End With
' Read the HTML file data
    sText = CreateObject("Scripting.FileSystemObject").OpenTextFile(sTempHTMLFile).ReadAll
' Close the created aux workbook
    .Close False
' Kill the HTML file
    Kill sTempHTMLFile
  End With
' Get/Create an Outlook instance
    On Error Resume Next
    Set objOutlookApp = GetObject(, "Outlook.Application")
    If Err Then
    Set objOutlookApp = CreateObject("Outlook.Application")
    IsOutlookCreated = True
    End If
    On Error GoTo 0
' Create a new email, fill it and send
    With objOutlookApp.CreateItem(0)
' Set HTML format
    .BodyFormat = 2
' Get default email signature without blinking (instead of .Display method)
    With .GetInspector: End With
    sSignature = .htmlbody
' Apply left aligning
    sText = Replace(sText, "align=center x:publishsource=", "align=left x:publishsource=")
' Concatenate all parts for HtmlBody
    sText = sFont & sHtmlHeader & sText & sSignature
' Insert sText into HtmlBody
    .htmlbody = sText
'*******************************************************************************************************
    'Specify email recipients, subject, etc:
    .To = sal
    '.Cc = "carboncopy@..."
    .Subject = "- Expired Eta Report for -   " & VND & "  ---  " & TDD
    .SentOnBehalfOfName = Behalf
   ' .Send '<-- Directly send out this email, use .Display instead for the debugging only
    .display
  End With
'Prevent memory leakage
  Set objAccount = Nothing
Next
 ' Quit Outlook instance if it was created by this code
    If IsOutlookCreated Then
    objOutlookApp.Quit
    Set objOutlookApp = Nothing
    End If
end suv
 
Last edited by a moderator:
Upvote 0
There's nothing that I can see in your code that would give that error.
As a guess try
Code:
For Each ws In Application.Worksheets
    [COLOR=#ff0000]If ws.Name <> "Summary" And ws.Name <> "Open Vendor Jobs" Then[/COLOR]
    ws.Activate
'Get Recipient
    sal = Range("N2")
    VND = Range("G2")
' Create top lines of the email body
    sHtmlHeader = VND & "," _
    & vbLf & vbLf _
    & "Below you will see a current summary of your job(s) that appear to be open and have not satisfied City’s response and/or completion requirements." _
    & vbLf _
    & "If these jobs are actually completed, please return to the worksite as soon as possible to finalize the job close-out process in Mercury." _
    & vbLf _
    & "For all jobs still in progress, please ensure the latest update is added into Mercury." _
    & vbLf _
    & "If for any reason you cannot complete these jobs, please respond with the issue you're encountering so we can help. " _
    & vbLf _
    & vbLf & vbLf _
    & "As an FYI, City’s priorities are listed below. Please make all attempts to meet these requirements as they directly impact Walmart store operations. " _
    & vbLf _
    & "*  P1 – 4 Hour Response, Completed in 4 Days." _
    & vbLf _
    & "*  P2 – 24 Hour Response, Completed in 7 Days." _
    & vbLf _
    & "*  P3 - 7 Day Response, Completed in 21 Days." _
    & vbLf _
    & vbLf & vbLf _
    & "We appreciate your continued partnership in servicing Walmart." _
    & vbLf _
    & "If you have any questions or concerns please contact us at wmtsubcontractors@cfm-us.com. " _
    & vbLf & vbLf
    sHtmlHeader = Replace(sHtmlHeader, vbLf, Chr(60) & "br" & Chr(62))
'User setting, change to suit
    Const FontName = "Arial"
    Const FontSize = 10
    Const Behalf = "************************ ' <-- Name to send on behalf of Exchange profile/account"
    Dim objOutlookApp As Object
    Dim IsOutlookCreated As Boolean
    Dim sFont As String, sText As String, sTempHTMLFile As String
' Set font of html-body (parentheses are just because of MrExcel posting limitation)
    sFont = "(body font: " & FontSize & "pt " & FontName & ";color:black"")(/p)"
    sFont = Replace(sFont, "(", Chr(60))
    sFont = Replace(sFont, ")", Chr(62))
'Copy range     Application.CutCopyMode = False
    Lr = Range("A1").End(xlDown).Row
    ActiveSheet.Range("A1:M" & Lr).Copy
' Get HTML data
    sTempHTMLFile = Environ("Temp") & "\Temp_for_Excel" & Format(Now, "YYYYMMDD_hhmmssms") & ".htm"
    With Workbooks.Add(xlWBATWorksheet)
' Paste data special
    With .Sheets(1).Cells(1)
    .PasteSpecial xlPasteValues
    .PasteSpecial xlPasteColumnWidths
    .PasteSpecial xlPasteFormats
    End With
    Application.CutCopyMode = False
' Publish HTML file data
    With .PublishObjects.Add(xlSourceRange, sTempHTMLFile, .Sheets(1).Name, .Sheets(1).UsedRange.Address, xlHtmlStatic)
    .Publish True
    End With
' Read the HTML file data
    sText = CreateObject("Scripting.FileSystemObject").OpenTextFile(sTempHTMLFile).ReadAll
' Close the created aux workbook
    .Close False
' Kill the HTML file
    Kill sTempHTMLFile
  End With
' Get/Create an Outlook instance
    On Error Resume Next
    Set objOutlookApp = GetObject(, "Outlook.Application")
    If Err Then
    Set objOutlookApp = CreateObject("Outlook.Application")
    IsOutlookCreated = True
    End If
    On Error GoTo 0
' Create a new email, fill it and send
    With objOutlookApp.CreateItem(0)
' Set HTML format
    .BodyFormat = 2
' Get default email signature without blinking (instead of .Display method)
    With .GetInspector: End With
    sSignature = .htmlbody
' Apply left aligning
    sText = Replace(sText, "align=center x:publishsource=", "align=left x:publishsource=")
' Concatenate all parts for HtmlBody
    sText = sFont & sHtmlHeader & sText & sSignature
' Insert sText into HtmlBody
    .htmlbody = sText
'*******************************************************************************************************
    'Specify email recipients, subject, etc:
    .To = sal
    '.Cc = "carboncopy@..."
    .Subject = "- Expired Eta Report for -   " & VND & "  ---  " & TDD
    .SentOnBehalfOfName = Behalf
   ' .Send '<-- Directly send out this email, use .Display instead for the debugging only
    .display
  End With
'Prevent memory leakage
  Set objAccount = Nothing
 [COLOR=#ff0000] End If[/COLOR]
Next
Also when posting code, please use code tags, the # icon in the reply window
 
Upvote 0
Thank you. But that did not work. It gives me a next without for error. And if I delete it I then get a for without next error.
I am confused.
 
Upvote 0
Got ya. here it is.
And thank you for you support, your help truly is appreciated.

Code:
Sub OpenOrders()
em = InputBox("Email  [Y/N] ")
TDD = Range("A3")
'Trim Sheet
    Cells.Select
    Selection.Locked = False
    Selection.FormulaHidden = False
    Selection.UnMerge
    Selection.ColumnWidth = 8
    Rows("1:4").Select
    Selection.Delete Shift:=xlUp
'Add Calcs
' Add Date Columns
    Range("S1").Select
    ActiveCell.FormulaR1C1 = "DAYS LATE"
    Range("T1").Select
    ActiveCell.FormulaR1C1 = "GRACE"
    Range("U1").Select
    ActiveCell.FormulaR1C1 = "DATE"
    Range("V1").Select
    ActiveCell.FormulaR1C1 = "LATE"
    Range("S2").Select
    ActiveCell.FormulaR1C1 = "=RC[2]-RC[1]"
    Range("T2").Select
    ActiveCell.FormulaR1C1 = _
        "=IF(RC[-14]=""P1"",""4"",IF(RC[-14]=""P2"",""7"",IF(RC[-14]=""p3"",""21"","""")))"
    Range("U2").Select
    ActiveCell.FormulaR1C1 = "=DAYS(TODAY(),RC[-9])"
    Range("V2").Select
    ActiveCell.FormulaR1C1 = "=IF(VALUE(RC[-1])>VALUE(RC[-2]),""Y"",""N"")"
    Range("W2").Select
'Fill sheet
'Format
 Range("S1:V2").Select
    With Selection
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlBottom
        .WrapText = False
        .Orientation = 0
        .AddIndent = False
        .IndentLevel = 0
        .ShrinkToFit = False
        .ReadingOrder = xlContext
        .MergeCells = False
    End With
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeBottom)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlEdgeRight)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideVertical)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
    With Selection.Borders(xlInsideHorizontal)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlThin
    End With
'Cells
   LR = Range("A1").End(xlDown).Row
    Range("S2:V2").Select
    Selection.AutoFill Destination:=Range("S2:V" & LR), Type:=xlFillDefault
    'Move Late Column
    Columns("s:s").Select
    Selection.Cut
    Columns("Q:Q").Select
    Selection.Insert Shift:=xlToRight
    Range("Q1").Select
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .ThemeColor = xlThemeColorLight1
        .TintAndShade = 4.99893185216834E-02
        .PatternTintAndShade = 0
    End With
    With Selection.Font
        .Color = -16711681
        .TintAndShade = 0
    End With
'Delete if not late
    For LR = Range("a" & Rows.Count).End(xlUp).Row To 2 Step -1
    If Range("v" & LR).Value = "n" Then Rows(LR).EntireRow.Delete
    If Range("v" & LR).Value = "N" Then Rows(LR).EntireRow.Delete
    Next
'trim xs columns
    Range("D:D,E:E,H:H,K:K").Select
    Selection.Delete Shift:=xlToLeft
'Sort
    awsn = ActiveSheet.Name
    LR = Range("A1").End(xlDown).Row
    Cells.Select
    ActiveWorkbook.Worksheets(awsn).Sort.SortFields.Clear
    ActiveWorkbook.Worksheets(awsn).Sort.SortFields.Add Key:=Range("G2:G" & LR)
    ActiveWorkbook.Worksheets(awsn).Sort.SortFields.Add Key:=Range("D2:D" & LR)
    ActiveWorkbook.Worksheets(awsn).Sort.SortFields.Add Key:=Range("C2:C" & LR)
    With ActiveWorkbook.Worksheets(awsn).Sort
    .SetRange Range("A1:n" & LR)
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
'Add tab naming field
    Columns("G:G").Select
    Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
    Range("G2").Select
    ActiveCell.FormulaR1C1 = "=LEFT(RC[1],30)"
    Range("G2").Select
    Selection.AutoFill Destination:=Range("G2:G" & LR)
    Range("G2:G" & LR).Select
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
'Remove  special charectors
    With Columns("G:G")
    .Replace What:="\", Replacement:=""
    .Replace What:="/", Replacement:=""
    .Replace What:="-", Replacement:=" "
    .Replace What:="(", Replacement:=""
    .Replace What:=")", Replacement:=""
    .Replace What:=",", Replacement:=""
    .Replace What:="&", Replacement:=""
    .Replace What:=".", Replacement:=""
    End With
'Parse Sheets
   awsn = ActiveSheet.Name
   LR = Range("A1").End(xlDown).Row
   With Worksheets(awsn)
   .Range("A1:T" & LR).Value = .Evaluate("INDEX(PROPER(A1:T" & LR & "),)")
   End With
   Set WS = Sheets(awsn)
   If WS.AutoFilterMode Then WS.AutoFilterMode = False
   With CreateObject("scripting.dictionary")
   For Each Cl In WS.Range("G2", WS.Range("G" & Rows.Count).End(xlUp))
   If Not .Exists(Cl.Value) Then
   Sheets.Add.Name = Cl.Value
   .Add Cl.Value, Nothing
   WS.Range("A1:T1").AutoFilter 7, Cl.Value
   WS.AutoFilter.Range.Copy Worksheets(Cl.Value).Range("A1")
'Format for email
    Columns("G:G").Select
    Selection.Delete Shift:=xlToLeft
    Cells.Select
    Selection.ColumnWidth = 254
    Cells.EntireRow.AutoFit
    Cells.EntireColumn.AutoFit
   End If
   Next Cl
   End With
   
   
   
  '  Sheets("Open Vendor Jobs").Delete
   
   
  ' GoTo snd
    
    
    'Create Summary Sheet
    If ActiveSheet.Name = "Summary" Then
    Application.DisplayAlerts = False
    Worksheets("Summary").Delete
    Application.DisplayAlerts = True
    End If
    WS_Count = ActiveWorkbook.Sheets.Count
'Create New Summary Sheet
    Worksheets.Add Before:=Worksheets(1)
    ActiveSheet.Name = "Summary"
'Count last row in column A across all sheets
    For i = 2 To WS_Count + 1
    LR = ActiveWorkbook.Sheets(i).Cells(Rows.Count, "A").End(xlUp).Row - 1
    With Sheets("Summary")
    .Cells(i, 1).Value = Sheets(i).Name
    .Cells(i, 2).Value = LR
    End With
    Next i
' Align Top
    Range("A1:B1").Select
    Selection.Delete Shift:=xlUp
    Cells.Select
    Cells.EntireColumn.AutoFit
    LR = Range("A1").End(xlDown).Row
'Sort
    ActiveWorkbook.Worksheets("Summary").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Summary").Sort.SortFields.Add Key:=Range("B1:B" & LR), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
    ActiveWorkbook.Worksheets("Summary").Sort.SortFields.Add Key:=Range("A1:A" & LR), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
    With ActiveWorkbook.Worksheets("Summary").Sort
    .SetRange Range("A1:B" & LR)
    .Header = xlGuess
    .MatchCase = False
    Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
snd:
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If em = "Y" Then GoTo nxt1
If em = "y" Then GoTo nxt1
End
nxt1:
'Email Section
    For Each WS In Application.Worksheets
    WS.Activate
   ' If WS.Name = "Summary"
   ' If WS.Name = "Open Vendor Jobs"
'Get Recipient
    sal = Range("N2")
    VND = Range("G2")
' Create top lines of the email body
    sHtmlHeader = VND & "," _
    & vbLf & vbLf _
    & "Below you will see a current summary of your job(s) that appear to be open and have not satisfied City?s response and/or completion requirements." _
    & vbLf _
    & "If these jobs are actually completed, please return to the worksite as soon as possible to finalize the job close-out process in Mercury." _
    & vbLf _
    & "For all jobs still in progress, please ensure the latest update is added into Mercury." _
    & vbLf _
    & "If for any reason you cannot complete these jobs, please respond with the issue you're encountering so we can help. " _
    & vbLf _
    & vbLf & vbLf _
    & "As an FYI, City?s priorities are listed below. Please make all attempts to meet these requirements as they directly impact Walmart store operations. " _
    & vbLf _
    & "*? P1 ? 4 Hour Response, Completed in 4 Days." _
    & vbLf _
    & "*? P2 ? 24 Hour Response, Completed in 7 Days." _
    & vbLf _
    & "*? P3 - 7 Day Response, Completed in 21 Days." _
    & vbLf _
    & vbLf & vbLf _
    & "We appreciate your continued partnership in servicing Walmart." _
    & vbLf _
    & "If you have any questions or concerns please contact us at wmtsubcontractors@cfm-us.com. " _
    & vbLf & vbLf
    sHtmlHeader = Replace(sHtmlHeader, vbLf, Chr(60) & "br" & Chr(62))
'User setting, change to suit
    Const FontName = "Arial"
    Const FontSize = 10
    Const Behalf = "wmtsubcontractors@cfm-us.com" ' <-- Name to send on behalf of Exchange profile/account
    Dim objOutlookApp As Object
    Dim IsOutlookCreated As Boolean
    Dim sFont As String, sText As String, sTempHTMLFile As String
' Set font of html-body (parentheses are just because of MrExcel posting limitation)
    sFont = "(body font: " & FontSize & "pt " & FontName & ";color:black"")(/p)"
    sFont = Replace(sFont, "(", Chr(60))
    sFont = Replace(sFont, ")", Chr(62))
'Copy range     Application.CutCopyMode = False
    LR = Range("A1").End(xlDown).Row
    ActiveSheet.Range("A1:M" & LR).Copy
' Get HTML data
    sTempHTMLFile = Environ("Temp") & "\Temp_for_Excel" & Format(Now, "YYYYMMDD_hhmmssms") & ".htm"
    With Workbooks.Add(xlWBATWorksheet)
' Paste data special
    With .Sheets(1).Cells(1)
    .PasteSpecial xlPasteValues
    .PasteSpecial xlPasteColumnWidths
    .PasteSpecial xlPasteFormats
    End With
    Application.CutCopyMode = False
' Publish HTML file data
    With .PublishObjects.Add(xlSourceRange, sTempHTMLFile, .Sheets(1).Name, .Sheets(1).UsedRange.Address, xlHtmlStatic)
    .Publish True
    End With
' Read the HTML file data
    sText = CreateObject("Scripting.FileSystemObject").OpenTextFile(sTempHTMLFile).ReadAll
' Close the created aux workbook
    .Close False
' Kill the HTML file
    Kill sTempHTMLFile
  End With
' Get/Create an Outlook instance
    On Error Resume Next
    Set objOutlookApp = GetObject(, "Outlook.Application")
    If Err Then
    Set objOutlookApp = CreateObject("Outlook.Application")
    IsOutlookCreated = True
    End If
    On Error GoTo 0
' Create a new email, fill it and send
    With objOutlookApp.CreateItem(0)
' Set HTML format
    .BodyFormat = 2
' Get default email signature without blinking (instead of .Display method)
    With .GetInspector: End With
    sSignature = .htmlbody
' Apply left aligning
    sText = Replace(sText, "align=center x:publishsource=", "align=left x:publishsource=")
' Concatenate all parts for HtmlBody
    sText = sFont & sHtmlHeader & sText & sSignature
' Insert sText into HtmlBody
    .htmlbody = sText
'*******************************************************************************************************
    'Specify email recipients, subject, etc:
    .To = sal
    '.Cc = "carboncopy@..."
    .Subject = "- Expired Eta Report for -   " & VND & "  ---  " & TDD
    .SentOnBehalfOfName = Behalf
   '.Send '<-- Directly send out this email, use .Display instead for the debugging only
    .display
  End With
'Prevent memory leakage
  Set objAccount = Nothing
Next
 ' Quit Outlook instance if it was created by this code
    If IsOutlookCreated Then
    objOutlookApp.Quit
    Set objOutlookApp = Nothing
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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