View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default If statement with validation list

If you may have leading or trailing space that will cause the problem.
This formula will remove leading/trailing spaces

=IF(TRIM(A1)="Travel","OK","Not OK")


"Pete" wrote:

ok, it seems that my IF statement will not work if the formula references a
cell that contains the validation list. Oye vey ....

"Pete" wrote:

In a data entry worksheet, I want to ensure that users select a certain
'category' for all expenses. I am using a validation list (with dropdown)
for the Category. I then created this IF statement to check whether the user
selected the right category for the expense. Unfortunately, my IF statement
always results in FALSE, even when the Category is correct. Is it even
possible to use IF statements with a validation list? My formula works great
if I check a cell that does not use the validation list. Any thoughts?