Problem with MODE in date range

Fishboy

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

Another day, another spreadsheet issue!

I have an Excel 2010 workbook in which the first sheet (Contact History) captures the details of various contacts between a client and their suppliers. It captures phone calls and emails, what they were about, who they were with and what date / time they occurred on.

The second sheet (Stats) offers reporting on the details captured on the first sheet.

I have a couple of formulas which should be telling me who is the most common occurring contact name within the specified date range, and what the reasons for the contact was. The formulas I have are as follows:

=IFERROR(INDEX('Contact History'!$H$2:$H$1072,MODE(IF('Contact History'!$A$2:$A$1072>=DATE(2015,3,1),IF('Contact History'!$A2:$A1072<=DATE(2015,3,31),MATCH($I$2:$I$1072,$I$2:$I$1072,0))))),"N/A")

It is my understanding that the above should be doing the following:


  • Checking range A2:A1072 for dates between 01/03/15 and 31/03/15
  • Checking H2:H1072 within the above date range and providing the MODE for this range
  • If the above checks return an error, to fill the cell with "N/A"

Now, based on the rest of the data I am recording, I know the most common reason for contact should be coming back as "Confirmation" but for some reason it is miscounting and returning "Information" instead.

Looking at the formula now, I must admit I am unsure where the I2:I1072 bit has come from....
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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