Forum Discussion
Excel Challenge HELP - If you want a challenge with Date, List, Filtering...
- 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
try:
Column A is the "DATE", Column B is the "PRODUCT" and Column C is the "VALUE"
add Column D as "ADJUSTED VALUE"
in Cell D2 - paste formula below and copy down to suit:
=IFERROR(IF(OR(SMALL($A$2:$A$999,1)=A2,SMALL($A$2:$A$999,2)=A2,SMALL($A$2:$A$999,3)=A2),"",C2),"")
where cell A2 is the start of the month
and cell A999 is the end of the month
HTH
- MATEO LARESGOITINov 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 LauNov 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 07, 2018Bronze Contributor
I have a new approach.
You must save the file as Macro Enabled (.xlsm)
pls see attached file.
the column for DATE will be sorted and the top 3 value changed to zero.
press ALT F8 then run the Macro
hope this can help.
thanks..
- MATEO LARESGOITINov 08, 2018Copper ContributorThank you! It worked perfectly
- Lorenzo KimNov 06, 2018Bronze Contributor
pls see attached file
thanks..