1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

    Yours,
    Chandoo
  2. 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...

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

Dialogue Box

Discussion in 'VBA Macros' started by JudeMarcus, Mar 13, 2018.

  1. JudeMarcus

    JudeMarcus New Member

    Messages:
    9
    Hello Team,
    Please refer to the attached sample file. I am looking for a macro which pops up a dialogue box saying" Sorry no data available" when there is no data in the table. And whenever there is any data updated in the table then there shouldn't be any pop up box appearing

    Thank You

    Attached Files:

  2. Marc L

    Marc L Excel Ninja

    Messages:
    3,892
    Hi !

    Respecting TEBV rule, something like

    If [COUNTA(B6:F19)] = 0 Then MsgBox "No data !"

    As a reminder : « The better explanation, the better answer … »
  3. JudeMarcus

    JudeMarcus New Member

    Messages:
    9
    Apologies for the inconvenience. Let me rephrase my requirement

    1)Data in Sheet 2 is connected with Sheet 1. There will be scenarios where based on the data of Sheet 1, Sheet 2 will be having no values to display

    2) Therefore on this instance when there is no values to be displayed in table of sheet 2, then there should be a message box as "NO UNITS"

    Have attached the revised sample file

    Hope this will suffice

    Thank You

    Attached Files:

  4. Marc L

    Marc L Excel Ninja

    Messages:
    3,892

    So directly edit formula of Sheet2!B6 :

    =IF(Sheet1!C6=0,"NO UNIT !",Sheet1!C6) …​
  5. JudeMarcus

    JudeMarcus New Member

    Messages:
    9
    Thank you so much Marc

Share This Page