Forum Discussion
MATEO LARESGOITI
Nov 05, 2018Copper Contributor
Excel Challenge HELP - If you want a challenge with Date, List, Filtering...
I have a list of products sold and the dates they were sold. The first 3 products sold every month are given away for free. So I need in a single cell (if possible), to calculate if the product is on...
- Nov 08, 2018
=IF(OR(SUMPRODUCT(TEXT($B2,"yyyymm")=TEXT($B$1:$B$51,"yyyymm"))*($B2>$B$2:$B$51))+1)={1,2,3}),0,$C2)
$B$2:$B$51 is supposed for the sold date with time.
reference : excel rank by group
MATEO LARESGOITI
Nov 06, 2018Copper Contributor
Thanks for your reply but it still doesn't seem to do the trick. It's working but it gives me only the first three products within all the list, not the first three products of every month. Here is a screen-shot:
Willy Lau
Nov 08, 2018Iron Contributor
=IF(OR(SUMPRODUCT(TEXT($B2,"yyyymm")=TEXT($B$1:$B$51,"yyyymm"))*($B2>$B$2:$B$51))+1)={1,2,3}),0,$C2)
$B$2:$B$51 is supposed for the sold date with time.
reference : excel rank by group
- MATEO LARESGOITINov 08, 2018Copper ContributorPerfect! Thank you it worked perfectly! I actually altered it a bit and ended up with something a little simpler:
=IF((SUMPRODUCT((TEXT($D$6:$D$999,"yyyymm")=TEXT($D6,"yyyymm"))*(D6>$D$6:$D$999))+1)<=3,0,$C2)- Lorenzo KimNov 08, 2018Bronze Contributornice formula....
congratz - Willy LauNov 08, 2018Iron Contributoryes, it is better. Just in case you want to let it be free if the item is the xth, yth, zth, you may use my approach. :)