I have drop-down list in H4 (A, B, C, D, E). I want an error message when H4 has C, D, or E and I4 is empty (do not contain an email address). Many Thanks I am stuck on this for a long time. !!
I have drop-down list in H4 (A, B, C, D, E). I want an error message when H4 has C, D, or E and I4 is empty (do not contain an email address). Many Thanks I am stuck on this for a long time. !!
Since you are already using Data Validation to create the dropdown list (I assume), you can use conditional formatting to change the background color to red (for example) when that condition is met. Otherwise, I think you'll need to resort to VBA.
=AND(OR(H4="C", H4="D", H4="E"), LEN($I4)<1)
Would that work for you?
ChemistB
My 2?
substitute commas with semi-colons if your region settings requires
Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)
Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble
I believe you'll need to use an event driven VBA. Is that okay with you?
Sorry I have no experience with VBA. How long will it take to learn this? I have to send across this template to other departments to fill and send back !
I can write the VBA. are we just talking about H4 or is it H4:H100?
Thank you very much. Actually it is N4 to N166 and I want the error message "Please enter email address" for not filling corresponding cell in column O. And the same relationship applies for P & Q, R & S, T & U, V & W, X & Y, Z & AA, AB & AC, AD & AE. Thank you, you are a life saver.
Okay, try this.
Right click on the sheet tab where all this is happening. Then "View code"
Paste this code into the window that opens up (VBA Editor) text box on the right of screenSee if it worksPlease Login or Register to view this content.
Last edited by ChemistB; 04-07-2014 at 04:11 PM.
Works great ChemistB. Thank you million times. Cheers
Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.
In future, to mark your thread as Solved, you can do the following -
Select Thread Tools-> Mark thread as Solved.
Incase your issue is not solved, you can undo it as follows -
Select Thread Tools-> Mark thread as Unsolved.
Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks