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

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
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
Effective datePlease fill in Effective date with correct format.
Request datePlease fill in Request date with correct format.
Salary

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"]FALSE[/TD]

[TD="align: center"]2[/TD]

[TD="align: right"][/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]$2,000.00 [/TD]

</tbody>
Sheet20

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]C1[/TH]
[TD="align: left"]=IF(B1=FALSE,"Please fill in "&A1&" with correct format.","")[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]



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,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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