Display Custom Message when value is False

Rome023

New Member
Joined
Oct 10, 2017
Messages
5
Hello Experts!


I am having a problem when it comes to ranges and message boxes.


To give you a picture, if excel finds a "False" text in col B, then it will display the message in col C.


If there are many noted "False", then it will display all the messages in col C.


Example


A B C
1 Effective date False Please fill in Effective date with correct format.
2 Request date False Please fill in Request date with correct format.
3 Salary False Please fill in Salary with correct format




Let me know if you have questions/clarifications.

I would really appreciate your feeback as this matter is quite urgent :/


Thank you in advance!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Btw, the vba will run after clicking on save to check if there are False items that needs to be actions (shown in Message box).

I just realized, the cells are defaulted to blank thus making it all false upon opening the file.

Hope this help clear things.

Thank you very much!
 
Upvote 0
Hi,

This is a Formula solution:


Book1
ABC
1Effective dateFALSEPlease fill in Effective date with correct format.
2Request datePlease fill in Request date with correct format.
3Salary$2,000.00
Sheet20
Cell Formulas
RangeFormula
C1=IF(B1=FALSE,"Please fill in "&A1&" with correct format.","")


C1 formula copied down.
 
Last edited:
Upvote 0
Hi,

This is a Formula solution:

ABC
1Effective dateFALSEPlease fill in Effective date with correct format.
2Request datePlease fill in Request date with correct format.
3Salary$2,000.00

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet20

Worksheet Formulas
CellFormula
C1=IF(B1=FALSE,"Please fill in "&A1&" with correct format.","")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



C1 formula copied down.

Thanks for the quick reply! However, what I really want is to have this message pops before the user saves the file.

This is to prevent incorrect format and blanks before saving it.

Is this possible? Thank you very much Sir!
 
Upvote 0
To be clear, Col C is already pre-filled. I set those messages in case there is a False in Col B (with excel formula). So what i want is a VBA what will find those False items and display it via message box containing the custom message in col C. If there are three False entries, then it will display the appropriate custom messages before saving the file.

Let me know if you need further clarification.

Thank you very much!
 
Upvote 0
If the save option cannot be done, then at least the error log in the vba message would suffice.

Problem is i do not know how to input the range in vba :/
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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