Data Validation & List Function

TripletDad

Board Regular
Joined
Oct 19, 2010
Messages
121
The easiest way to explain this is to just say it... please bear with me :eek:.

I have a cell (D2) that refers to a previous cell (A2). If A2 says "Yes", then D2 should say return the value of B2+C2. If A2 says "No", the D2 should allow certain values from a predetermined list. Confused yet?

It seems like this is an "IF" statement coupled with Data Validation. Any ideas?

Thank you in advance :)

-Jeff
 

Some videos you may like

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

memar_one

Board Regular
Joined
Jul 20, 2012
Messages
161
That was just an example of how an If function works. The first area in the if function is the boolean question (does A2 = "Yes" ?) The second area (after the comma) is what you do if the previous statement returned "True". If the previous statement returned "False", then the third area (after the second comma) would be used.

Example:

=IF(A2="Yes", do this if true, do this if false)

So you can refine my if-statement to:

=IF(A2="Yes", B2+C2, IF(A2="No", B2, C2))

And that was called a "nested" if statement, which performs another if statement if the first is false. In this case, your cell will now either display B2+C2 if A2="Yes", just B2 if A2="No", and just C2 if A2 is anything else (including empty). If you have A2 be a function that returns "Yes" or "No", then this if statement will still perform properly because it only looks at the value of the cell after its function returns the value.

I'm probably not understanding your question very well, but I hope this helps.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,804
Messages
5,598,151
Members
414,214
Latest member
marketingnumbersguy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top