I am struggling with something that should not be this difficult and I cannot seem to find an answer googling. I am using Excel 2010.
In Cell B1, it is populated via a validation list. The list is from D1 and D2, which contain male and female respectively. Cell B1, D1 and D2 are formatted as text cells. I have a conditional formula in cell B2, =If(b1="male","he","she"). This formula always yields "she" even when "male" is in cell B1. When I eliminate the validation list in Cell B1, and manually type "male", the conditional formula in Cell B2 works as expected with "he" being populated. There is obviously something "different" when selecting text from a validation list to make a conditional formula function properly....but for the life of me, I can't figure this out. I will probably be embarrassed by the answer, but after an hour, I have made no progress. Thanks. JimC
Conditional Formula on Cell Contents from a validation list
-
- 3StarLounger
- Posts: 382
- Joined: 08 Feb 2010, 16:08
-
- PlatinumLounger
- Posts: 4936
- Joined: 31 Aug 2016, 09:02
Re: Conditional Formula on Cell Contents from a validation l
May be the source of validation list which are in D1 and D2 are different from the formula
I mean you may type Male and Female (with capital letters at the beginning)
And the formula the initials are small so this may be the cause of your problem
Check also formulas tab >> Calculation options >> Make sure it is Automatic
It is better to upload sample workbook to be able to determine exactly what is wrong
I mean you may type Male and Female (with capital letters at the beginning)
And the formula the initials are small so this may be the cause of your problem
Check also formulas tab >> Calculation options >> Make sure it is Automatic
It is better to upload sample workbook to be able to determine exactly what is wrong
-
- Administrator
- Posts: 78674
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Conditional Formula on Cell Contents from a validation l
It should work the same, whether you select the value from a validation dropdown list or enter it directly.
Make sure that there are no spaces before or after the word "male" in cell D1. If D1 (and hence B1) contains "male ", for example, the condition B1="male" would never be true.
(Upper case/lower case doesn't matter here)
Make sure that there are no spaces before or after the word "male" in cell D1. If D1 (and hence B1) contains "male ", for example, the condition B1="male" would never be true.
(Upper case/lower case doesn't matter here)
Best wishes,
Hans
Hans
-
- 3StarLounger
- Posts: 382
- Joined: 08 Feb 2010, 16:08
Re: Conditional Formula on Cell Contents from a validation l
Example worksheet attached. Thanks for your help. JimC
You do not have the required permissions to view the files attached to this post.
-
- 3StarLounger
- Posts: 382
- Joined: 08 Feb 2010, 16:08
Re: Conditional Formula on Cell Contents from a validation l
I was experimenting with the formula and added an extra ' ' in the answer in the compare statement and now that I removed them, it works but it didn't work when I first tried. Sorry to waste your time.
Last edited by JimmyC on 27 Oct 2016, 15:05, edited 1 time in total.
-
- Administrator
- Posts: 78674
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Conditional Formula on Cell Contents from a validation l
OK, no problem. Glad that you were able to solve it.
Best wishes,
Hans
Hans
-
- PlatinumLounger
- Posts: 4936
- Joined: 31 Aug 2016, 09:02
Re: Conditional Formula on Cell Contents from a validation l
Glad you could figure it out
Regards
Regards