How do Count a the number of times a date range appears within a date range!?

I'm stumped, I have no real idea on how to do this so any help much
appreciated!

I have a start date (no year ie, 1st December)
and an end date (again no year say 5th Jan),

And a date range, eg 11th May 2001 to 1 January 2006

for info late:
1st Dec to 5th Jan = 35 days

How do i get a count of the number of 1st Decemebers to 5th Januarys in
that date range
for example

1st December 2001 to 5th January 2002 is 1st
1st December 2002 to 5th January 2003 is 2nd
1st December 2003 to 5th January 2004 is 3rd
1st December 2004 to 5th January 2005 is 4th

1st December 2005 to 1th January 2006 is 4.8857 4+(31/35)

So there are 4.8857 1st Dec - 5th Januarys!  But how do i get a formula
or script to do this, preferable a formula as i need to use the result
in another formula

If it helps what i am ultimately trying to do is calculate an average
weekly sales figure for many different products.  but exclude the 5
week period beginning 1st Dec.

Existing formumal is
=Prod1Sales/(DAYS360(Prod1LaunchDate,ReportingDate)/7)

=Prod1Sales/((DAYS360(Prod1LaunchDate,ReportingDate)/7)-NoDecJans*35)

Where NoDecJan is the formula i cant work out for the number of Dec-Jan
periods, and the 35 is the 35days in the period.

Have i over complicated this is there a simple way?

Any help much appreciated.

0
leelondon (2)
9/27/2006 4:26:52 PM
excel 39879 articles. 2 followers. Follow

5 Replies
311 Views

Similar Articles

[PageSpeed] 25

You may get farther by using the NETWORDAYS() function.  The third
(optional) parameter in that function allows you to specify a range.
In that range, you have all the dates that are EXCLUDED from the "work
calendar."  If you defined in that range the list of dates from
01DEC-05JAN, then maybe that would help.  However, these dates need
years as well, so you'd have to be careful that as years go by in your
analysis, that your defined non-work days kept up.  But you could
define those dates pretty easily by using the DATE() formula, which
would reference a base year, and then it would auto-update.  Anyway,
give that some thought.

Micah

leelondon wrote:
> I'm stumped, I have no real idea on how to do this so any help much
> appreciated!
>
> I have a start date (no year ie, 1st December)
> and an end date (again no year say 5th Jan),
>
> And a date range, eg 11th May 2001 to 1 January 2006
>
> for info late:
> 1st Dec to 5th Jan = 35 days
>
> How do i get a count of the number of 1st Decemebers to 5th Januarys in
> that date range
> for example
>
> 1st December 2001 to 5th January 2002 is 1st
> 1st December 2002 to 5th January 2003 is 2nd
> 1st December 2003 to 5th January 2004 is 3rd
> 1st December 2004 to 5th January 2005 is 4th
>
> 1st December 2005 to 1th January 2006 is 4.8857 4+(31/35)
>
> So there are 4.8857 1st Dec - 5th Januarys!  But how do i get a formula
> or script to do this, preferable a formula as i need to use the result
> in another formula
>
> If it helps what i am ultimately trying to do is calculate an average
> weekly sales figure for many different products.  but exclude the 5
> week period beginning 1st Dec.
>
> Existing formumal is
> =Prod1Sales/(DAYS360(Prod1LaunchDate,ReportingDate)/7)
>
> =Prod1Sales/((DAYS360(Prod1LaunchDate,ReportingDate)/7)-NoDecJans*35)
>
> Where NoDecJan is the formula i cant work out for the number of Dec-Jan
> periods, and the 35 is the 35days in the period.
>
> Have i over complicated this is there a simple way?
> 
> Any help much appreciated.

0
hirschman (6)
9/27/2006 8:31:33 PM
You may get farther by using the NETWORKDAYS() function.  The third
(optional) parameter in that function allows you to specify a range.
In that range, you have all the dates that are EXCLUDED from the "work
calendar."  If you defined in that range the list of dates from
01DEC-05JAN, then maybe that would help.  However, these dates need
years as well, so you'd have to be careful that as years go by in your
analysis, that your defined non-work days kept up.  But you could
define those dates pretty easily by using the DATE() formula, which
would reference a base year, and then it would auto-update.  Anyway,
give that some thought.

Micah

leelondon wrote:
> I'm stumped, I have no real idea on how to do this so any help much
> appreciated!
>
> I have a start date (no year ie, 1st December)
> and an end date (again no year say 5th Jan),
>
> And a date range, eg 11th May 2001 to 1 January 2006
>
> for info late:
> 1st Dec to 5th Jan = 35 days
>
> How do i get a count of the number of 1st Decemebers to 5th Januarys in
> that date range
> for example
>
> 1st December 2001 to 5th January 2002 is 1st
> 1st December 2002 to 5th January 2003 is 2nd
> 1st December 2003 to 5th January 2004 is 3rd
> 1st December 2004 to 5th January 2005 is 4th
>
> 1st December 2005 to 1th January 2006 is 4.8857 4+(31/35)
>
> So there are 4.8857 1st Dec - 5th Januarys!  But how do i get a formula
> or script to do this, preferable a formula as i need to use the result
> in another formula
>
> If it helps what i am ultimately trying to do is calculate an average
> weekly sales figure for many different products.  but exclude the 5
> week period beginning 1st Dec.
>
> Existing formumal is
> =Prod1Sales/(DAYS360(Prod1LaunchDate,ReportingDate)/7)
>
> =Prod1Sales/((DAYS360(Prod1LaunchDate,ReportingDate)/7)-NoDecJans*35)
>
> Where NoDecJan is the formula i cant work out for the number of Dec-Jan
> periods, and the 35 is the 35days in the period.
>
> Have i over complicated this is there a simple way?
> 
> Any help much appreciated.

0
hirschman (6)
9/27/2006 8:31:39 PM
You may get farther by using the NETWORKDAYS() function.  The third
(optional) parameter in that function allows you to specify a range.
In that range, you have all the dates that are EXCLUDED from the "work
calendar."  If you defined in that range the list of dates from
01DEC-05JAN, then maybe that would help.  However, these dates need
years as well, so you'd have to be careful that as years go by in your
analysis, that your defined non-work days kept up.  But you could
define those dates pretty easily by using the DATE() formula, which
would reference a base year, and then it would auto-update.  Anyway,
give that some thought.

Micah

leelondon wrote:
> I'm stumped, I have no real idea on how to do this so any help much
> appreciated!
>
> I have a start date (no year ie, 1st December)
> and an end date (again no year say 5th Jan),
>
> And a date range, eg 11th May 2001 to 1 January 2006
>
> for info late:
> 1st Dec to 5th Jan = 35 days
>
> How do i get a count of the number of 1st Decemebers to 5th Januarys in
> that date range
> for example
>
> 1st December 2001 to 5th January 2002 is 1st
> 1st December 2002 to 5th January 2003 is 2nd
> 1st December 2003 to 5th January 2004 is 3rd
> 1st December 2004 to 5th January 2005 is 4th
>
> 1st December 2005 to 1th January 2006 is 4.8857 4+(31/35)
>
> So there are 4.8857 1st Dec - 5th Januarys!  But how do i get a formula
> or script to do this, preferable a formula as i need to use the result
> in another formula
>
> If it helps what i am ultimately trying to do is calculate an average
> weekly sales figure for many different products.  but exclude the 5
> week period beginning 1st Dec.
>
> Existing formumal is
> =Prod1Sales/(DAYS360(Prod1LaunchDate,ReportingDate)/7)
>
> =Prod1Sales/((DAYS360(Prod1LaunchDate,ReportingDate)/7)-NoDecJans*35)
>
> Where NoDecJan is the formula i cant work out for the number of Dec-Jan
> periods, and the 35 is the 35days in the period.
>
> Have i over complicated this is there a simple way?
> 
> Any help much appreciated.

0
hirschman (6)
9/27/2006 8:31:44 PM
days360 defines a specific algorithm for normalizing months, a
defined on the follow page

http://office.microsoft.com/en-ca/assistance/ha011609841033.asp

so first make sure you're using the right algorithm.  if you're base
in Europe, you might need to set the third parameter of DAYS360() t
TRUE to use the European method

NETWORKDAYS() counts working days so it's a different animal, thoug
the idea of excluded dates is what's needed here.

i would use the algorithm to count days whenever possible.  fo
instance, DAYS360("12/1/2005", "1/5/2006") = 34
not 35.  (american style dates MM/DD/YYYY

i would substract from DAYS360(Launch, reporting) the number of WHOL
35 day periods, ie WHOLE periods * 35, then subtract DAYS360(X,Y) fo
X and Y between 12/1/AAAA and 1/5/BBBB, ie use the DAYS360 function
then finally divide by 7 to get week averages

(a recursive function could work nicely here...

-----------------------------------------------------------------------
ExcelJockey's profile: http://www.exceljockeys.com/forums/profile.php?mode=viewprofile&u=
View this thread: http://www.exceljockeys.com/forums/viewtopic.php?t=30772

0
9/28/2006 12:14:47 AM
Thanks everyone, I will give it some thought, appreciate all your help.

0
leelondon (2)
10/4/2006 11:12:03 AM
Reply:

Similar Artilces:

Solver checked but doesn't appear
I have checked the Solver add-in in my Excel in Office XP and it goes through the motions of installing it but Solver never appears in the tools menu. It is in the Office10/Library/Solver directory. When I double click on Solver.xla it tells me that it can't find some guid in the registry. (When I do this at my work with Office 2000 Solver comes up in Excel.) I have tried repairing my Office and removing and re-adding Solver but nothing seems to work. I am afraid to reinstall Office because I really need my Office right now. I am using Windows XP Home with Service Pack 2. I have seen t...

How to get a long column of numbers to wrap and print on 1 page?
I have a long column of numbers that we add to daily. This column needs to be sorted in ascending order and then printed. I don't know of a way to sort multiple columns together so that is why it is one long column. Is there a way to get it to print as multiple columns across a page so as to not have numerous pages with only 1 column on each? Thanks. take a look here: http://www.mvps.org/dmcritchie/excel/snakecol.htm In article <3880FBB4-BF95-4A82-B98A-519C79BF1A34@microsoft.com>, Sue <Sue@discussions.microsoft.com> wrote: > I have a long column of numbers th...

Pivot table and counting.
I have a pivot table that gives me the number of rides done by a van. I can have the pivot table return the number of rides, but what I need is the number vans that participated for a certain day. Example, it is possible to have 27 trips done by 18 vans, how can I count the number of vans and not addup the van number? Any help appreciated. Thank you, Joe Hi Joe We need a bit more information on how your source data table is set up. What information do you have in each column? -- Regards Roger Govier sacredarms <sacredarms@discussions.microsoft.com> wrote: > I have a pi...

Downloading Bank Transactions Multiple Times (MSM2003)
If you download transactions from your bank (or whatever) multiple times -- say downloading all transactions several times a month -- will Money (2003 in my case) recognize that this has been done and ignore the duplicates, or will it just require matching and/or reconcilliation each time. I'd like to keep my Money records up-to-date (i.e., not wait to the end of the month) without having to keep track of which transactions have or have not been downloaded. Currently, I download to a file all transactions for a given statement cycle each month on or after the statement closing date. This...

Cycle Counting
Hello, I am looking for ideas on how to cycle count serial number tracked items without increasing workload. Our serialized items are barcoded but the problem is the are situated on the pallet incorrectly and the pallet is placed on a third level of a racking system. If we could just cycle count based on item count and not include the serial number it would make it easy. Is this possible in Great Plains. We are running Great Plains 8.0. Any suggestions are greatly aprreciated. Thank You, Brian Morris Database Administrator ...

Removiing decimals from an excel number
Here is the issue: I have numbers like this one - 10000.01.01.200 I just want the prime number 10000. How can I do that? I tried Ctrl+F and replace but is there a more efficient way? Thanks! =LEFT(A1,FIND(".",A1)-1) -- Gary''s Student - gsnu201001 "Data Analyst" wrote: > Here is the issue: I have numbers like this one - 10000.01.01.200 > > I just want the prime number 10000. How can I do that? I tried Ctrl+F and > replace but is there a more efficient way? > > Thanks! try this =LEFT(A1,FIND(".",A1,1)-1)...

Set RN = Range(Cells(2, 1), Cells(r, 1)) error
What wrong with this. It create error. How can I improve to get rid the error? Set RN = Range(Cells(2, 1), Cells(r, 1)) Thanks Daniel Hi Daniel, Too much missing information - has r been declared and what data type is it and what value does it have. What property of the range are you trying to store in the variable RN? What type of variable is RN and has it been declared. -- Thanks, Shane Devenshire "Daniel" wrote: > What wrong with this. It create error. How can I improve to get rid the > error? > > Set RN = Range(Cells(2, 1), Cells(r, 1)) > &...

Linking a defined range to a picture in PowerPoint
Hi, I know this is a long shot, but I'm hoping SOMEBODY has the answer.... I need to create a power point presentation that links to an excel workbook. The reason I need to link it is because the numbers will change monthly, and the presentation is distributed monthly. So, I need to create a presentation that will: 1) have excel worksheets in it that link to defined ranges in a workbook. 2) HOPEFULLY have the Pow.Pt. worksheet appear as a bitmap (if not thats ok) 3) allow the Pow.Pt. SS (or the picture) to link to the SS so that the image will change every month. I know it'...

Count
Hi, I would like to know how which formula I should use to count some codes & to ignore the duplicated codes, for example in column A: Code 1234 4321 4321 1234 1234 3214 Now, I want Excel to count & the result is 3 which are: 1234-4321-3214 Yes I can use PivotTable, but I would like to use a formula because I have to deal with this every day. I appreciate your support. -- MFS22 COUNTIF will do it. =COUNTIF(Rng,Rng), where the criterion is the same as the range: e.g =COUNTIF(A3:A8,A3:A8) HTH Peter "MFS" wrote: > Hi, > I wo...

Window's verson numbers
I'm writing an app in C++ using VS.net and I need to do this based on the OS. I can get the OS version number using _osver global variable found in the include STDLIB.H. But I need a list of what version number correspond to what OS so I know what the value in _osver means. Does anyone know where I can find these definitions? Also the major and minor builds might be useful? If this is the wrong newsgroup could you direct me to the right one? Thank Lots, Neil Neil B wrote: >I'm writing an app in C++ using VS.net and I need to do this based on the OS. >I can get the OS ver...

How do I count the # of times a value reoccurs and plot it over ti
I wish to plot a number of errors made by each users and compare it over time. I have a column of user ID's and a column of dates. I want the chart to count the number of times each user ID appears and plot against it's corresponding date. However, each time I try to do this, the chart appears wrong. Any ideas? In article <9595B2A1-8282-4AB3-8511-A6776E108164@microsoft.com>, Stephen@discussions.microsoft.com says... > I wish to plot a number of errors made by each users and compare it over > time. I have a column of user ID's and a column of dates. I want t...

Line count
I am working with a program called Dictaphone. We use Word 2007 in this program. The line count on Dictaphone and the line count in Word 2007 are different even though the Dictaphone text is retrieved from Word 2007. Why would they be different? What is the difference between virutal line count and physical line count? ...

group still appearing in GAL after change from Distribution to sec
Hi, I hope someone can help me out with this issue. I recently changed a group from a distribution group to a security group. I cannot see the group on the GAL but if I check the "member of" tab in outlook it still shows the group (even though it is now a security and not a distribution group) Any help would be appreciated. thanks what if you right-click the list, to to Exchange tasks, and either "remove email address" or "remove Exchange attributes"? -- Susan Conkey [MVP] "chrisr" <chrisr@discussions.microsoft.com> wrote in message ...

count number of characters in rich edit control
How can i count number of characters in rich edit control 2 If u mean controls of type Rich TextBox control, try RichControl1 RC1; CString Mes=RC.GetText(); int n=Mes.GetLength(); "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i count number of characters in rich edit control 2 EM_GETTEXTLENGTHEX, WM_GETTEXTLENGTH, WM_GETTEXT, EM_STREAM* "Rahul" <Rahul@discussions.microsoft.com> wrote in message news:7743023C-EA83-4ACA-AB67-F1AE7279F1EB@microsoft.com... > How can i co...

subscript out of range error
My program went down with on error in the code. I fixed that error an tried to re-run it. When I go to re-run the program I get a subscrip out of range error when I try to open a worksheet that I know exists. If I close the workbook and re-open it the subscript out of range erro doesn't show up. Below is the code. With Worksheets("ListBox Data").Range("A2") workbook_row_cnt = Range(.Offset(0, 0) .End(xlDown)).Rows.Count For i = 0 To workbook_row_cnt - 1 If .Offset(i, 0) <> "" Then sales_group_cnt = sales_group_cnt + 1 End If Next i End With ...

Author of Excel workbook appear in footer
Is there a way/code to have the author of the excel file appear automatically in the custom header/footer of an Excel 97 file. Maybe some type of code. Any help would be greatly appreciated. Thank you. Try this Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim wkSht As Worksheet For Each wkSht In ActiveWindow.SelectedSheets wkSht.PageSetup.RightFooter = ActiveWorkbook.BuiltinDocumentProperties("Author") Next wkSht End Sub You must place it in the Thisworkbook module When you print it will add the name in the footer Right click on the Excel icon next to File in the men...

Counting sales
I have two different datasets. Each with a common identifier. I need a formula that will reference the identifiers in both datasets and count the number of sales a particular agent made. Example. look up this identifier in the other dataset and then give me the value that is 2 columns over from the identifier in the second dataset. See if this helps: http://contextures.com/xlFunctions02.html -- Biff Microsoft Excel MVP "Dave" <Dave@discussions.microsoft.com> wrote in message news:E7245B37-033F-400E-9CEE-9822BE7CB0F5@microsoft.com... >I have two...

Date range for a report
Hi I am trying to run a query and can't seem to nail down the right code. We use the access database to track files, incoming/outgoing correspondence dates etc. I am trying to run a query that show me files with dates in a follow up field of -60 days to +7 days, so essentially any follow ups missed in the last 2 months and up coming in the next week. This report is run on a weekly basis. Appreciate any help Thanks Assuming that the follow up field is actually a date/time data type, try this in the criteria: Between Date() - 60 and Date() + 7 -- Jerry Whittle, ...

COUNT ? need formula
Hi, I want to track the results of my teams sales performance. I record if it is a sale, no sale, cancelled etc in column M. I thought I'd be able to use the COUNT function/formula to be able to search for all the SALES in column M and place the result in a cell ( column O )but I can't work it out. Any ideas? Damian Hi! Try this: =COUNTIF(M1:M100,"sale") Biff "Diamond Jones" <kwanzaNOSPAM@optusnet.com.au> wrote in message news:43a0e897$0$17704$afc38c87@news.optusnet.com.au... > Hi, > > I want to track the results of my teams sales perf...

Auto date range updating in Charts
I would like to know how to write a formula that can be typed into an excel chart's category labels box and series values boxes to search for and update ranges to a specific range, such as one year's worth of row entries. In this way, each time a new date and set of entries are made into the spreadsheet, the accompanying chart would update to the new range (last date). I have tried using named formulas to accomplish this, but I have so many spreadsheet in the workbook, that this becomes unwieldy. Any suggestions would be greatly appreciated. thanks, Hi Dave, > I have t...

Counting Cells with Conditional Formatting
Is there a way to look at a row of data that is either highlighted yellow or red and to count only the data that is highlighted yellow and give me that number? None of my data is numerical....just one letter data, i.e.: "S" or "U" I just want to count how many of the cells are highlighted yellow in a specific row, if that makes more sense. Here's a UDF (Put in a Standard module) and use it in cell A1, like =CountByColor(A8:H8,6) << where 6 (at present) = Yellow = change to =CountByColor(A8:H8,3) to get the reds HTH Function CountByColor(InRa...

Prompted to accept terms and cond for every prog every time its op
I run Windows 7 Home Premium and Office 2003 Professional. I have only been up and running for about a week now. Everythinng has worked out fine other than being prompted to accept the terms and conditions for each program in office, every time that they are opened up. Anybody have any ideas? I encountered a similar problem with Vista and Office. Every time one of the office products opened, it went through the reconfiguration process. I know it's not the same as your problem, but the solution might be the same. From this link: http://social.technet.microsoft.com/Forum...

telephone number field mask
I have a field I use for telephone numbers. I would like the mask to return data like this : 111 111 1111. What is the formula for this? Any help is appreciated. Mtn244: Thanks much for assistance. I tried your mask with great success. All is good in River City. Thanks again for your help. Frank "mtn244" <mtn244@discussions.microsoft.com> wrote in message news:82895481-BC0D-4FB7-A9A8-1649395C1224@microsoft.com... > Try this input mask: > !999 000 0000;0; > > "Frank" wrote: > >> I have a field I use for telephone numbers. I would lik...

Count Function
I am creating a report for the number of pupils being collected at a certain collection time e.g. 14:00hr and 15:00hrs using the formula =Count([Child Last Name]) in the collection time footer However when i try to count the overall number of pupils in the footer using the same formula, 'Error' appears on screen? Thanks There are potentially a dozen footer sections in a report. Which one is giving you a problem? What is the name of the control? What is the exact formula? -- Duane Hookom Microsoft Access MVP "ELo" wrote: > I am creating a r...

Counting a count
How do I count a count?? This is what im trying to do: I have a database with a table named tblMain and has incorporated everything within that table but contains info from about 8 other tables. I have not doesigned this database and it appears to have a very poor structure...anyway There are three fields involved in this process...'Request' (either 'dispensation', 'waiver' or 'dispensation and waiver'), 'Department' (which consists of 7 other drop down menu options) and 'RequestStatus' which contains the status of each request by another...