ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Custom Data Validation (https://www.excelbanter.com/excel-discussion-misc-queries/108041-custom-data-validation.html)

Steve E

Custom Data Validation
 
I am trying to force a user to enter a value only if certain criteria are
present in the worksheet.

Example:
IF cells D11:D32 contain the letter "z" and IF the SUM(C37:C42)=0 I want my
user to be prompted to enter a quantity in (at least) C37 that is a whole
number.

I'm at a loss as to how to set this up.

Help?

Thanks,

Steve

Debra Dalgleish

Custom Data Validation
 
Data validation can't force a user to enter a value in a cell, it can
only validate what they've typed in a cell.

Perhaps you could use a formula to display a message in another cell,
under those conditions, e.g.:

=IF(AND(COUNTIF($D$11:$D$32,"z"),SUM($D$37:$D$42)= 0),
"Enter a value in cell C37","")

Or, use conditional formatting to black out some cells under those
conditions, using a similar formula.

Otherwise, you could use programming to check the cells and display a
message.

Steve E wrote:
I am trying to force a user to enter a value only if certain criteria are
present in the worksheet.

Example:
IF cells D11:D32 contain the letter "z" and IF the SUM(C37:C42)=0 I want my
user to be prompted to enter a quantity in (at least) C37 that is a whole
number.

I'm at a loss as to how to set this up.

Help?

Thanks,

Steve



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html



All times are GMT +1. The time now is 10:34 PM.

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