Share via

Message box with an IF statement

Anonymous
2023-02-02T08:12:49+00:00

Hello,

I am trying to figure out the best way to make this work.

I would like to Popup a Message that will alert the user about entering a Job Number.

For example:

If Expense Type starts with Job, then a Message Box "Please Enter Job Number"

Or if the user navigates to Column F (Purpose) to not to let the him continue unless they enter a Job Number if the Expense Type starts with "Job"

Your help will be greatly appreciated.

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2023-02-02T08:53:28+00:00

Hi julietajb,

Greetings! Thank you for posting to Microsoft Community.

You can use data validation to get a message box.

Select F3:F10. Data>Data Validation

Uncheck Ignore Blank, select custom, Input formula.

=IF(COUNTIF(D3,"*job*")>0,LEN(E3)>0,TRUE)

Then you can set custom message for it.

Best Regards,

Snow Lu

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2023-02-02T19:34:41+00:00

    Thank you so much Snow Lu!!! it worked!

    I did the data validation for the first row and just drag it down to the rest of the rows in the spreadsheet.

    Was this answer helpful?

    0 comments No comments