Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Matt
 
Posts: n/a
Default Can I use a List in a IF Function?

I want to be able to have a IF function that says =IF(B77=Tile,Grout,"N/A") .

Tile - being a choice from a drop down list.
Grout - being a list of colors if the choose Tile.
"N/A" - if they do not choose Tile from the list.

Is this possible?
  #3   Report Post  
Jack Sheet
 
Posts: n/a
Default

Sounds like you are trying to create dynamic drop down lists.
Have a look at
http://www.xldynamic.com/source/xld.Dropdowns.html

Can be done without VBA, but a bit fiddly and not sure if it is more
efficient. That is of course always assuming that I have read the question
correctly.
Perhaps what you are trying is altogether simpler.

--
Return email address is not as DEEP as it appears

"Matt" wrote in message
...
I want to be able to have a IF function that says =IF(B77=Tile,Grout,"N/A")
.

Tile - being a choice from a drop down list.
Grout - being a list of colors if the choose Tile.
"N/A" - if they do not choose Tile from the list.

Is this possible?



  #4   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

I'm not sure about "N/A" - is it Excel's returned error, or simply an user
entry. But in general, the next formula will do what you do want
=IF(SUMPRODUCT(--(B77={"Tile";"Grout";"Whatever"}))0;"Is in list";"Is
missing from list")


Arvi Laanemets


"Matt" wrote in message
...
I want to be able to have a IF function that says

=IF(B77=Tile,Grout,"N/A") .

Tile - being a choice from a drop down list.
Grout - being a list of colors if the choose Tile.
"N/A" - if they do not choose Tile from the list.

Is this possible?



  #5   Report Post  
KL
 
Posts: n/a
Default

=IF(SUMPRODUCT(--(A4={"Tile";"Grout";"N/A"})),"Present","Not Present")

this formula will not report the error #N/A! as present.

KL

"Matt" wrote in message
...
I want to be able to have a IF function that says =IF(B77=Tile,Grout,"N/A")
.

Tile - being a choice from a drop down list.
Grout - being a list of colors if the choose Tile.
"N/A" - if they do not choose Tile from the list.

Is this possible?





  #6   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi again

It looks like I stumbled on some Excel odditie here. After I sent my answer,
I noticed that probably the formula I provided may be simplified. I tried
=IF(SUMPRODUCT((B77={"Tile","Grout","Whatever"})), "Is in list","Is missing
from list")
and discovered that it wasn't working - the check was always FALSE ?
BUT, then I tried
=IF(SUMPRODUCT(--(B77={"Tile","Grout","Whatever"})),"Is in list","Is missing
from list")
and the formula worked !!!???

PS. In my previous answer, probably function delimiters must be changed
(commas instead semicolons).


Arvi Laanemets


"Arvi Laanemets" wrote in message
...
Hi

I'm not sure about "N/A" - is it Excel's returned error, or simply an user
entry. But in general, the next formula will do what you do want
=IF(SUMPRODUCT(--(B77={"Tile";"Grout";"Whatever"}))0;"Is in list";"Is
missing from list")


Arvi Laanemets


"Matt" wrote in message
...
I want to be able to have a IF function that says

=IF(B77=Tile,Grout,"N/A") .

Tile - being a choice from a drop down list.
Grout - being a list of colors if the choose Tile.
"N/A" - if they do not choose Tile from the list.

Is this possible?





  #7   Report Post  
KL
 
Posts: n/a
Default

Arvi,

It is not an odditie. The thing is that B77={"Tile","Grout","Whatever"}
returns TRUE/FALSE which can't be digested by SUMPRODUCT unless it is
explicitly coerced to 1/0, which is why u are using "--"

Regards,
KL


"Arvi Laanemets" wrote in message
...
Hi again

It looks like I stumbled on some Excel odditie here. After I sent my
answer,
I noticed that probably the formula I provided may be simplified. I tried
=IF(SUMPRODUCT((B77={"Tile","Grout","Whatever"})), "Is in list","Is missing
from list")
and discovered that it wasn't working - the check was always FALSE ?
BUT, then I tried
=IF(SUMPRODUCT(--(B77={"Tile","Grout","Whatever"})),"Is in list","Is
missing
from list")
and the formula worked !!!???

PS. In my previous answer, probably function delimiters must be changed
(commas instead semicolons).


Arvi Laanemets


"Arvi Laanemets" wrote in message
...
Hi

I'm not sure about "N/A" - is it Excel's returned error, or simply an
user
entry. But in general, the next formula will do what you do want
=IF(SUMPRODUCT(--(B77={"Tile";"Grout";"Whatever"}))0;"Is in list";"Is
missing from list")


Arvi Laanemets


"Matt" wrote in message
...
I want to be able to have a IF function that says

=IF(B77=Tile,Grout,"N/A") .

Tile - being a choice from a drop down list.
Grout - being a list of colors if the choose Tile.
"N/A" - if they do not choose Tile from the list.

Is this possible?







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
Creating a dynamic list Jarrod A Excel Worksheet Functions 1 November 18th 05 11:29 PM
In Excel, why sort function fails when applied to a list of date? Excel heavy user Excel Discussion (Misc queries) 1 January 18th 05 06:37 PM
Extracting Values on one list and not another B Schwarz Excel Discussion (Misc queries) 4 January 7th 05 01:48 PM
Does anyone have a copy of the Peter Noneley: Function list? Marc New Users to Excel 1 December 6th 04 08:52 PM
Creating a list from an existing list. Jad Excel Worksheet Functions 1 October 29th 04 06:00 AM


All times are GMT +1. The time now is 03:28 PM.

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

About Us

"It's about Microsoft Excel"