title: Print Multiple Sheets with If statements for all sheets
body: <p>Basically there are 11 worksheets I need printed in a single pdf file. 1st worksheet needs to be fully printed, other 10 need to be based on a condition of a particular cell being >0.</p>
  
  <p>In my case there is a number that is spit out into a particular cell for each worksheet. Half are C16, other half is C20 (And I can't change them all to be the exact same, because other codes are reliant on it too).</p>
  
  <p>Is there a way to create a macro that would print all these worksheets into one pdf file with this condition in place?</p>
  
  <p>Here's a code I tried that doesn't have the if statement included because I don't know where I would implement it. SG is the tab that does NOT require a condition. Because the cells are mixed of which ones need C16 and C20, let's say 1-5 require C15, 6-10 require C20. Thank you! </p>
  
  <pre><code>Sub zxcv()
  
      Sheets(Array("SG", _
          "sh1", _
          "sh2", _
          "sh3", _
          "sh4", _
          "sh5", _
          "sh6", _
          "sh7", _
          "sh8", _
          "sh9", _
          "sh10")).Select
  
      Sheets("SG").Activate
  
      ChDir "C:\Users\mynamehere\Downloads\test"
      ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
          "C:\Users\mynamehere\Downloads\test\test2.pdf", Quality:=xlQualityStandard, _
          IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
          True
  End Sub
  </code></pre>