Select value from cell if 2 criteria are met

Closed
Report
-
Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
-
I stumbled upon this forum when trying to find this answer in Excel. Hopefully you all can help. Here's the deal:

I have a spreadsheet that has different values in every column. Column A has categories of products, column C has the store location code, and column F has the quantity sold of that product category. I want to ultimately select the value in column C if column A and F meet the criteria I set.

In a separate worksheet, I want to input a formula that essentially says (in English) "If column A = "AC" and column C = "J5", select the value in column F.

In other words, I want to be able to very easily see what quantity of AC that store J5 has sold. I have multiple stores and multiple product categories, so keep that in mind if that would change the formula.

Thank you!



1 reply

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
768
You can try this

=IF(AND(A1="AC", C1="J5"),F!1, "")

for more
=IF(AND(A1="AC", C1="J5"),F!1, IF(AND(AC1="AC2", C1="J52"), E1, ""))

You can up to seven nested if. If you have more than 7 nested if (if within another if, then you have to use macro or do some thing else (depending on situation)