Lookup values and sort based on Month and Category

Barcina

New Member
Joined
Jan 31, 2016
Messages
2
Hi all,

I am trying to build a formula looking up text values and then sort them by Month and category
DateCategoryColorResultJanFebMar
1/1/2016ARedARed, GreyBlue, Brown
5/2/2016ABlueBYellow
1/1/2016BYellowCRed
5/3/2016CRedD
13/1/2016AGrey
7/2/2016ABrown

<tbody>
</tbody>


Ideally, it should also skip duplicates e.g. if you have twice category A with color red in January it should list red just once. I tried different formulas from similar questions but just can't figure it out and would be very happy if you had any suggestions or advice.

Thank you
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Hi again,

I have this formula for the problem described above:
{=IF(ISERROR(INDEX($C$4:$E$172,SMALL(IF($D$4:$D$172=$G$4,ROW($D$4:$D$172)),ROW(1:1))-3,3)),"",INDEX($C$4:$E$172,SMALL(IF($D$4:$D$172=$G$4,ROW($D$4:$D$172)),ROW(1:1))-3,3))}

but as soon as I add the date condition it stops working:
{=IF(ISERROR(INDEX($C$4:$E$172,SMALL(IF(AND($D$4:$D$172=$G$4,B4<=EOMONTH($F$20,0),B4>=EDATE($G$21,0)),ROW($D$4:$D$172)),ROW(1:1))-3,3)),"",INDEX($C$4:$E$172,SMALL(IF(AND($D$4:$D$172=$G$4,B4<=EOMONTH($F$20,0),B4>=EDATE($F$21,0)),ROW(1:1))-3,3)))}

Any ideas why?
 
Upvote 0

Forum statistics

Threads
1,215,516
Messages
6,125,286
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top