I've been trying to add a partial text match as a criteria to the formula below, but with no success so far:
=SUM(--(FREQUENCY(IF(Sales[ClientID]=A21;IF(Sales[Operation]="Sale*";Sale[InvoiceNumber]));Sale[InvoiceNumber])>0))
The piece IF(Sales[Operation]="Sale*"; is the one that when added, always give me 0 as the result.
Here's some data:
Sales Table
Date ClientID Operation InvoiceNumber Total
01/01/2019 18090 Sale Adv 101010101 100
01/02/2019 20897 Sale Cash 105327892 100
01/03/2019 18090 Sample 41357398 100
01/01/2019 30456 Sale Check 43167429 100
10/04/2019 779584 Sale Cash 4326719 100
01/05/2019 30456 Refused 34162781 100
01/01/2019 90909 Sale Cash 3412679821 100
Results Table
ClientID Purchase Frequency
779584 ???
Here's the solution I borrowed from Scot Craner, in case someone else falls into the same question:
=SUM(--(FREQUENCY(IF(Sales[ClientID]=A21;IF(ISNUMBER(SEARCH("Sale";Sales[Operation]));Sale[InvoiceNumber]));Sale[InvoiceNumber])>0))
Thanks everyone!
Related
I have a problem with excel!
I need to check a list of values and if my value is exist between start and end in my list , get a price of which one is match in list
My product list this :
Id
Data
Product_Name
Price
1
9905
Mouse
$200
2
9915
Power
$300
1
9925
Case
$400
My Price list is :
Id
Start
End
Price
1
9900
9910
$200
2
9911
9920
$300
3
9921
9930
$400
Check Data in Product list is between Start and End in Price list and if Data is between Start and End so get me a value of Price
thhank!
VLOOKUP will do this:
=VLOOKUP(B2,H:J,3)
One note, make sure the lookup table is sorted ascending on the start column.
I Need to rank Dealers based on their Sales value and in regards to the Group and Country they belong to per month. It should look like this:
DealerID Month Country Group SalesValue Ranking
12344 1 Germany Sales 120 1
23345 1 Schweiz Sales 140 3
23346 1 Schweiz Sales 160 2
23347 1 Schweiz Sales 180 1
12350 1 Germany Sales 110 2
In SQL it would be similar to a rank function combined with a Group by month Country and Group. How can I achieve this in Excel?
Thank you!!
I have a list of data that is separated by Date, Team and their Category Score. Category Score changes for each Team on a daily basis and based on their actual score of the day, I'll need to identify the Category Score that they fall into.
For example, if on the 1st Jan 2018, Team A's score is 225. Team A's score whole fall in between 200 and 250. The assigned Score Category will then be rounded up to the last category which will be 200
However, the next day, Team A's Score Category is changed. The 225 score nicely rests on a Score Category and thus the assigned category will be 225.
Hopefully that gives a clear picture.
To help with the matter, the data is always sorted by Date and Team with ascending Score Category
I'm looking for an excel formula that hopefully does not use the array function.
I've so far looked at the Index Match formulas but they were all exact match that does not allow me to approximate to a value.
For e.g.
Date Team Score Category
1/1/2018 A 100
1/1/2018 A 150
1/1/2018 A 200
1/1/2018 A 250
1/1/2018 A 300
1/1/2018 B 300
1/1/2018 B 400
1/1/2018 B 500
2/1/2018 A 150
2/1/2018 A 200
2/1/2018 A 225
2/1/2018 A 300
2/1/2018 A 350
2/1/2018 B 350
2/1/2018 B 450
2/1/2018 B 550
Date: 1/1/2018
Team: A
Actual Score: 225
Category Score (Output): 200
Date: 2/1/2018
Team: A
Actual Score: 225
Category Score (Output): 225
Try this array formula:
= INDEX($C$2:$C$17,MATCH(B21,IF(($A$2:$A$17=B19)*($B$2:$B$17=B20),$C$2:$C$17),1))
Note this is an array formula, must be entered with Ctrl+Shift+Enter on your keyboard rather than just Enter.
See below, working example with your data. I also copied this cell from B22 to B27.
A few notes:
This formula only works if your Score Categories for a particular Date and Team combination are in ascending order (because using a third argument of 1 in MATCH requires that the data be sorted), but from the way your question is worded, it doesn't sound like this will be an issue.
The formula would probably also break if your Score Categories and/or Actual Scores are negative, since the IF statement effectively "zero's-out" the data you're not interested in for this particular Date and Team combination. But if the Actual Score is negative then it probably would erroneously consider one of these 0's as a match. This is just a guess, I didn't test this though.
Another thing to consider is to add a Score Category of 0 to the top of each Date and Team combination. I say this because if for example the Actual Score is lower than the lowest Score Category (e.g. if the Actual Score is 50 but the lowest Score Category is 100), then a match won't be found, and I'm guessing the formula would return an error.
I have a list of sales people, but only a portion of their sales can count in the sum total. Example:
SP Sales
John 600
Jane 200
John 50
Mike 150
=SUMIF(SP,"John",Sales) will give me the total of all John's sales.
But only up to 125 of each of John's sales can count in this total. So the result should be 175.
I tried: =IF(sales,>=125,"125"+SUMIF(SP,"John",Sales)) but it didn't work.
What do I require for it to work?
Please try:
=SUMIFS(B:B,A:A,"John",B:B,"<"&125)+125*COUNTIFS(A:A,"John",B:B,">=125")
Use an array formula like this:
{=SUM(--(A2:A5="John") * IF(B2:B5>125,125,B2:B5))}
I've got a table in Excel which is structure like so:
Month Date Time ID Name Currency Value
Jan 07/01/14 5 1234567 Ted GBP 500
Jan 10/01/14 12 1234567 Ted GBP 723
Feb 23/02/14 6 9877654 John GBP 300
Feb 10/02/14 10 1234567 Ted GBP 333
What I need to do is write a formula which basically returns be the total of Value where ID and Month are equal to whatever the lookup values are. For example, using the above I would say:
Find the total of Value where Month equals Jan and ID equals 1234567.
The answer in this case would be 1223.
Ive just tried
=SUMIFS(INPUT!H:H,INPUT!D:D='TRANS BY MID'!B2,INPUT!A:A='TRANS BY MID'!C1)
INPUT!H:H is my ID column
INPUT!D:D='TRANS BY MID'!B2 is the ID I want to use
INPUT!A:A is the Month column
TRANS BY MID'!C1 is Jan
To provide a working solution I simplified your question into one sheet. The data appears like this:
You can link your other sheet to the values shown in column J.
The formula is now this:
=SUMIFS(G:G,D:D,J1,A:A,J2)
The result is shown in J7: