Adding date range to FREQUENCY function

jray9242

Board Regular
Joined
May 7, 2011
Messages
61
I have a frequency function that I need to add a date range as well to it. Can this be done?

Here is my formula.

B = MyDate

=SUM(IF(FREQUENCY(B8:B3000,B8:B3000)>0,1))

I need to add something like this added to my FREQUENCY Function:

>="&DATE(2011,1,1) and <= "&DATE(2011,3,31)

Thank you,
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Adding date range to FREQUENCY function
<HR style="BACKGROUND-COLOR: #ffffff; COLOR: #ffffff" SIZE=1>I have a frequency function that I need to add a date range as well to it. Can this be done?

Here is my formula.

B = MyDate

=SUM(IF(FREQUENCY(B8:B3000,B8:B3000)>0,1))

I need to add something like this added to my FREQUENCY Function:

>="&DATE(2011,1,1) and <= "&DATE(2011,3,31)

How about:

= Sumproduct((B2:B3000>=Date(2011,1,1))*(B2:B3000<=Date(2011,3,31))

I didn't try this, but I am fairly certain.

Jeff
 
Upvote 0
Perfect and I have another question as an add on to this one that I will post soon.

Thanks again!
 
Upvote 0
I have a frequency function that I need to add a date range as well to it. Can this be done?

Here is my formula.

B = MyDate

=SUM(IF(FREQUENCY(B8:B3000,B8:B3000)>0,1))

This yields a count of unique dates.

I need to add something like this added to my FREQUENCY Function:

>="&DATE(2011,1,1) and <= "&DATE(2011,3,31)

Thank you,

These conditions would mean that you want to determine the number of unique dates between DATE(2011,1,1) and DATE(2011,3,31). Is this not what you want?
 
Upvote 0
Aladin Akyurek, You are correct.

Sorry for the confusion, this should help. It's been a long week.

Here is a better look at what I need and hope this is more clear what I need.

Under Date (B) I need to calc the value for the first quarter, The answer should be "3".

Thanks again for the help. All the answers have been great!

Excel Workbook
BCDEFGHIJKLMN
3BASIC
4DATEHOURSAGENCY TYPELOCATIONTOPICEVENT TYPEGIVEN BY(NAME)STUDENTS TRAINED (#)DELIVERY COSTB/OOTUASI / SHSGPCOSTNOTES
5
6432.0Pull Down42$3,600Pull Down
7
81/21/20118.0HealthBasic5400UASI
91/21/20118.0HealthBasic5400SHSGP
101/21/20118.0OtherBasic6400UASI
112/22/20118.0HealthBasic5400UASI
122/22/20118.0OtherBasic6400UASI
133/22/20118.0HealthBasic5400UASI
143/22/20118.0OtherBasic6400UASI
154/22/20118.0HealthBasic2400UASI
164/22/20118.0OtherBasic2400UASI
Basic
 
Last edited:
Upvote 0
Here's one way

=SUMPRODUCT((COUNTIF(B8:B1000,ROW(INDIRECT(DATE(2011,1,1)&":"&DATE(2011,3,31))))>0)+0)

that "hardcodes" the dates into the formula. Perhaps easier to put start date of the quarter in a cell, e.g. A1 and then use

=SUMPRODUCT((COUNTIF(B8:B1000,ROW(INDIRECT(A1&":"&EOMONTH(A1,2))))>0)+0)
 
Upvote 0
BINGO!

Thank you Barry! I never thought about using the INDIRECT function.

This is turning out to be a difficult project but the help here has been incredible and I am so much appreciative of all the help here.

Thanks again!

Jim
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,225
Members
448,951
Latest member
jennlynn

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