Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default If statement with validation list

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default If statement with validation list

Hi Pete

Post your formula

--
Regards

Roger Govier


"Pete" wrote in message
...
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?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default If statement with validation list

My cells a

A B C
Category Expense Check

Administration $- formula here
Full PRT Solution Development $- formula here
Full PRT Solution Development $- formula here
Product Development 4.5 $350.00 formula here

My formula is:

=IF(b10,IF(a1="Travel",,"Category Must Be Travel"),"OK")

"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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default If statement with validation list

=IF(AND(B10,OR(A1={"Travel","Category Must Be Travel"})),"OK"," Not OK")

"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?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default If statement with validation list

Maybe I should simplify it, take it one formula at a time.
Cell a1 = my category list, validation with dropdown.

My statement = IF(a1="Travel","OK","Not OK")
returns "FALSE" even if cell a1 = Travel.

"Teethless mama" wrote:

=IF(AND(B10,OR(A1={"Travel","Category Must Be Travel"})),"OK"," Not OK")

"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?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default If statement with validation list

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?

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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?

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 193
Default If statement with validation list

That did it, YOU ROK Teethless Mama.
Happy New Year!!!

"Teethless mama" wrote:

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?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation for list in a different workbook vicky Excel Discussion (Misc queries) 2 November 6th 06 10:25 PM
Can Validation against a list do auto-fill in a cell? pastrami_dave Excel Discussion (Misc queries) 5 October 6th 06 10:56 PM
Remove empty cells from named list / validation list Sp00k Excel Worksheet Functions 4 April 28th 06 03:45 PM
validation list Crispy Excel Worksheet Functions 1 April 9th 06 06:46 AM
Dependent List (via Data Validation) Error Dezdan Excel Worksheet Functions 2 December 2nd 05 12:33 AM


All times are GMT +1. The time now is 07:36 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"