Reader Question: Nested If Condition

Excel function tutorials

If you want to learn Excel, keep reading or Get 10 days of free unlimited access to Lynda.com. for professional help and Excel Tutorials
***************

One of the more recent questions that I got on the blog was the following:

I need some help.
I want to use an if statement for the following:
Quantity (d1)
Pk Qty (E1)
Total (F1)
UOM (AA1)

Formala Help to be entered in F1:
If pk qty = 0, then enter the value for d1 in F1, If Pk quantity is>0, then return D1*E1 unless UOM =FT, then enter D1

Let’s try ot resolve this one step at a time

First off, because I’m visual, I’ll put this into a spreadsheet:

Then, step by step:

“If pk qty = 0, then enter the value for d1 in F1″

=IF(E2=0,D2,””)

For the second part:

If Pk quantity is>0, then return D1*E1 unless UOM =FT, then enter D1

=IF(AA2=”FT”,D2,D2*E2)

Then, I can simply enter the 2nd part into the first formula:

The end result?

=IF(E2=0,D2,IF(AA2=”FT”,D2,D2*E2))

Once again, the key is doing this one step at a time, it’s that easy:)

***************************************************

Look Good at Work and Become Indispensable Become an Excel Pro and Impress Your Boss


***************************************************

Comments

Please Leave a Comment!





Please note: Comments may be moderated. It may take a while for them to show on the page.