• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Skip the formula if Sheet is not found

Hi,

I need help to complete my KPI report. I am in the final stage of the Macro.

After I run my format and calculation, I get the attached file wherein it has a Sheet called 'Report'. I have formula's which refers to other sheets and it can have 4 Sheets (OS, CS, OSV, OSC) but not all the time I get 4 sheets (since it is depends on the raw data). Some times it will be 2 sheets or 3 sheets. So my calculation step the Macro shows error since it is not able to find the missing sheet.

I tried to On Error GoTo "label" but does not work. I have attached one sample wherein I have kept only sheets and other 2 sheets missing in it.

Can you please help me to insert formula with those sheets which exists in the final file?
 

Attachments

  • KPI_Week_7 - Feb - 2018.xlsm
    23.4 KB · Views: 3
Last edited:
Why not encapsulate the formulas in an IFERROR() function

eg: I11: =IFERROR(COUNTIFS(OSV!T:T,Report!$D:$D,OSV!S:S,Report!$10:$10),0)
 
Thank you. It worked for me. I used Application.DisplayAlerts = False which helped to remove the file open dialogue as well. Thanks you again.
 
Back
Top