lundi 17 septembre 2018

Having multiple IF functions in Excel: How to override one function over another

So I have a "status" cell that should tell me whether an item has been "listed", "sold", or "shipped".

It is possible for any particular item to be listed, sold, and shipped at the same time, but I want the priority of the status cell to go like this: (Shipped-Sold-Listed).

Each shipped, sold, and listed status pulls from other cells that may or may not include data.

So far I have this as my formula:

=IF(AND($K4)<>"","Shipped",IF(AND($F4)<>"","Sold",IF(AND($H4)<>"","Listed")))

Right now the "status" for one of my cells is "Shipped" but when I take away the data in the K4 cell (aka: shipped data) it says there is an error. If my function was right, the lack of data in K4 would have made the formula look for data in F4 and continue to the following IF function.

I don't know if I'm missing a tiny detail or if I'm doing this all wrong. Any help would be greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire