ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Data Validation Error Message (https://www.excelbanter.com/excel-discussion-misc-queries/180275-data-validation-error-message.html)

BillCPA

Data Validation Error Message
 
Is there any way to use a cell address in the error message displayed with
data validation.

Example: cell A1=1 and A2=16, and data to be entered in cell C4 must be
equal to whatever is in A1 or A2. I can use a formula to check the value,
but when I display the error message, can I use A1 or A2 in the message, so
that it reads something like "This value must be equal to 1 or 16".

--
Bill @ UAMS

Max

Data Validation Error Message
 
An alternative alert is to use this in an adjacent cell eg in D4:
=IF(ISNA(MATCH(C4,A1:A2,0)),"This value must be equal to "&A1&" or "&A2,"")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"BillCPA" wrote:
Is there any way to use a cell address in the error message displayed with
data validation.

Example: cell A1=1 and A2=16, and data to be entered in cell C4 must be
equal to whatever is in A1 or A2. I can use a formula to check the value,
but when I display the error message, can I use A1 or A2 in the message, so
that it reads something like "This value must be equal to 1 or 16".

--
Bill @ UAMS



All times are GMT +1. The time now is 05:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com