简体   繁体   中英

Count Index based on Multiple Conditions - Excel

I have a table with order records for each Product Type. The columns contain information like Order Number, Customer Name, Product Category, Product, and Order Receipt Date.

My goal is to find the quantity of orders that fall into the below conditions:

  1. New Customers Ordering any Product Category for the First Time
  2. Existing Customers Ordering from any Product Category for the First Time
  3. Reorders from any Product Category

What would be the best way to go about this?

Think I figured it out:

I created two columns for records: "First Product Type Order?" and "First Order?"

"First_Product_Type_Order" : IF(AND(Order2=Order1,Product_Type2=Product_Type1),First_Product_Type_Order1,IF(SUMPRODUCT(($Customer$2:$Customer2=D2)*($Product_Type$2:$Product_Type2=Product_Type2))>1,"Reorder","First Time Order"))

"First_Order": IF(Order2=Order1,First_Order1,IF(SUMPRODUCT(($Customer$2:$Customer2=Customer2)*1)>1,"Existing Customer","New Customer"))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM