![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 133
|
In cell D14 I wriiten the following validation code B14="C" OR B14="B" Basically an "A", "B", or "C" is generated from a VLOOKUP statement and I want the validation to code to throw up an error message if either an "A" or "B" is in cell B14. Any ideas?
|
|
|
|
|
|
#2 |
|
New Member
Join Date: May 2002
Posts: 10
|
Data validation isn't volatile. It won't validate cell values generated by formulas.
|
|
|
|
|
|
#3 | |
|
MrExcel MVP
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
|
Quote:
If Conditional Formatting approach works for you, then apply the following Conditional Format to cell D14 =OR(B1="B",B14="C") Format Paste color 'red' Regards! _________________ Yogi Anand Edit: Deleted inactive web site reference from hard code signature line [ This Message was edited by: Yogi Anand on 2003-01-19 17:02 ] |
|
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Huntington Beach, CA USA
Posts: 327
|
Hi,
Have you tried this with a message box? If [B14].Value = A or If [B14].Value = B Then MsgBox "wrong data", vbExclamation The above was not tested James |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 133
|
Thanks guys the conditional formating did the trick !
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|