Counting most common text value of column - within date range

Fishboy

Well-known Member
Joined
Feb 13, 2015
Messages
4,267
Hi all,

I am currently using the following formula in Excel 2010:

=INDEX('Contact History'!C:C,(MODE(MATCH(C:C,C:C,0))))

What it does is look at the sheet called "Contact History", checks column C and reports the most common contact name. So far so good.

What I am trying to add in to the mix is for it to also check "Contact History" column A for a date range (say 01/01/15 to 31/01/15 for example) first, then report the most common contact name within that date range.

Is there a way to add the following?:

'Contact History'!$A:$A,">="&DATE(2015,1,1),'Contact History'!$A:$A,"<="&DATE(2015,1,31))
 

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.
Try...

=INDEX('Contact History'!C:C,MODE(IF('Contact History'!$A:$A>=DATE(2015,1,1),IF('Contact History'!$A:$A<=DATE(2015,1,31),MATCH(C:C,C:C,0)))))

To ignore blanks that may exist in Column C, try...

=INDEX('Contact History'!C:C,MODE(IF('Contact History'!$A:$A>=DATE(2015,1,1),IF('Contact History'!$A:$A<=DATE(2015,1,31),IF('Contact History'!C:C<>"",MATCH(C:C,C:C,0))))))

Note that both these formulas need to be confirmed with CONTROL+SHIFT+ENTER. Although, I'd suggest that you avoid using whole column references, which can be resource intensive. If the range increases over time, convert your data into a table or use dynamic named ranges. In either case, the range automatically adjusts as data is added or removed.

Hope this helps!
 
Upvote 0

Forum statistics

Threads
1,215,633
Messages
6,125,922
Members
449,274
Latest member
mrcsbenson

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