Unique list, combining 2 columns, with a date range criteria

Pappy

New Member
Joined
Oct 7, 2016
Messages
1
Hello All,

Thanks in advance for any help you can give me.

I need to extract a unique list of names from two columns of names, but only names that fall within a given date range. I would also like for the extracted list to be sorted alphabetically a-z.

The datasheet is a list of "deals" for various salespeople. Sometimes more than one sales person works on the same deal, thus the reason for two columns of names (Salesperson1 & Salesperson2). Often the Salesperson2 column will be blank. This is a growing list of deals, so ideally the solution would be dynamic.

I've created multiple dynamic named ranges, one each for Salesperson1 & Salesperson2. The current formula I have will extract a unique list of names from both columns, but I have not been able to figure out how to add in the extra criteria for the date range. Here is the array formula I'm using currently:

{=IFERROR(IFERROR(INDEX(Salesperson1,MATCH(0,IF(ISBLANK(Salesperson1),1,COUNTIFS($B$3:B3,Salesperson1)),0)),INDEX(Salesperson2,MATCH(0,IF(ISBLANK(Salesperson2),1,COUNTIFS($B$3:B3,Salesperson2)),0))),"")}

The above sits in cell B4, and is copied down the column past the likely number of rows needed for the list of names.

I have a drop down list for the start date located at cell J1 and the end date at cell M1 in the same sheet. On the datasheet, column A starting at row 3 contains the dates associated with each deal. I have a dynamic named range for those dates named "DealDates".

I've tried to add in additional criteria in the "Countifs" portions of the formula using something like this:

DealDates,">="&$J$1,DealDates,"<="&$M$1

But it doesn't work, I just end up with blank results:

{=IFERROR(IFERROR(INDEX(Salesperson1,MATCH(0,IF(ISBLANK(Salesperson1),1,COUNTIFS($B$3:B3,Salesperson1,DealDates,">="&$J$1,DealDates,"<="&$M$1)),0)),INDEX(Salesperson2,MATCH(0,IF(ISBLANK(Salesperson2),1,COUNTIFS($B$3:B3,Salesperson2,DealDates,">="&$J$1,DealDates,"<="&$M$1)),0))),"")}

I'm probably missing something easy, or else I'm going about it all the wrong way.

I could add in helper columns if needed, but would prefer a completely contained formula if possible. The list of deals is added to daily and we plan to keep about 13 months of data on it, so something around 10,000 rows will end up in the data sheet of deals.

Other information:
OS: Win7
I'm using Excel 2016, but I need to accommodate people using Excel 2010 & 2013.

Any help or pointers you can give me would be much appreciated.

Patrick
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi Patrick,
one thing I can spot in your formula:
=COUNTIFS($B$3:B3,Salesperson1,DealDates,">="&$J$1,DealDates,"<="&$M$1)
-> this will only do something if the range DealDates has the same height as $B$3:B3, which it will probably only be at one line.
Hope that helps?
Koen
 
Upvote 0

Forum statistics

Threads
1,214,402
Messages
6,119,304
Members
448,886
Latest member
GBCTeacher

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