HatchetHarry
New Member
- Joined
- Aug 20, 2018
- Messages
- 16
- Office Version
- 365
Moderator edit: Google Sheets question - see post #6
Let's say I have a line with 3 data: email, date of purchase, location
The formula will check that the customer purchased last month, the location is 'Location 1' and will count only ONCE this customer even though he could have bought multiple times last month.
I have 2 formulas that are working individually but I'm struggling to combine:
The first one is checking the last month entries (COL B) and also checking if the cell contains 'Location 1' sentence (COL C) then returns the total.
=COUNTIFS('Orders'!B:B,">=" & EOMONTH(TODAY(),-2)+1,'Orders'!B:B,"<" & EOMONTH(TODAY(),-1)+1, 'Orders'!C:C,"Location 1")
The second one is checking for unique values using the email address.
=SUMPRODUCT(1/COUNTIF(A2:A6,A2:A6))
*To note that if the cell is empty it will return in error, so bonus point if someone can help me to get the full range (i.e: =SUMPRODUCT(1/COUNTIF(A:A,A:A))
From the screenshot above:
Date: MM/DD/YYYY
Unique customers from LAST month should be 2 at Location 1.
Any idea on how to combine them?
Thanks a lot.
Let's say I have a line with 3 data: email, date of purchase, location
The formula will check that the customer purchased last month, the location is 'Location 1' and will count only ONCE this customer even though he could have bought multiple times last month.
I have 2 formulas that are working individually but I'm struggling to combine:
The first one is checking the last month entries (COL B) and also checking if the cell contains 'Location 1' sentence (COL C) then returns the total.
=COUNTIFS('Orders'!B:B,">=" & EOMONTH(TODAY(),-2)+1,'Orders'!B:B,"<" & EOMONTH(TODAY(),-1)+1, 'Orders'!C:C,"Location 1")
The second one is checking for unique values using the email address.
=SUMPRODUCT(1/COUNTIF(A2:A6,A2:A6))
*To note that if the cell is empty it will return in error, so bonus point if someone can help me to get the full range (i.e: =SUMPRODUCT(1/COUNTIF(A:A,A:A))
From the screenshot above:
Date: MM/DD/YYYY
Unique customers from LAST month should be 2 at Location 1.
Any idea on how to combine them?
Thanks a lot.
Attachments
Last edited by a moderator: