Good Evening,
I am working on a spreadsheet that I am using "If, And, Countifs" function for two columns of data. Column A has location numbers and Column B has "order type" information. I need to identify the number of Location occurences in Column A and a specific Order Type in Column B.
If there is more than 1 Location occurence in Column A, and if Column B meets the specific criteria, I need to ignore only 1 occurence of any previous rows that meet the same Location criteria in Column A, but is a different order type in Column B, resulting in a 1 for all occurences under Order_Type 1 but 1 and 0 for Order_Type2.
The formula I am using is =IF(Location="","",IF(AND(Order_Type1=1,COUNTIF(Location,Location)>1,COUNTIFS(Location,Location,Order_Type2,1)=1),0,1)). This works ok if there are only 2 location occurences, but for 3 or more location occurences, I get a 0 result for all Order_Type1 occurences.
I am using Excel 2007 with Windows XP. Thank you in advance.
I am working on a spreadsheet that I am using "If, And, Countifs" function for two columns of data. Column A has location numbers and Column B has "order type" information. I need to identify the number of Location occurences in Column A and a specific Order Type in Column B.
If there is more than 1 Location occurence in Column A, and if Column B meets the specific criteria, I need to ignore only 1 occurence of any previous rows that meet the same Location criteria in Column A, but is a different order type in Column B, resulting in a 1 for all occurences under Order_Type 1 but 1 and 0 for Order_Type2.
The formula I am using is =IF(Location="","",IF(AND(Order_Type1=1,COUNTIF(Location,Location)>1,COUNTIFS(Location,Location,Order_Type2,1)=1),0,1)). This works ok if there are only 2 location occurences, but for 3 or more location occurences, I get a 0 result for all Order_Type1 occurences.
I am using Excel 2007 with Windows XP. Thank you in advance.