#### Sum value between dates problem driving me mad!2

```Good Evening All,
Many aplogies for the crappy formatting of my previous post, I have done it
properly (I hope) now.
I am really struggling here, have tried, nested IF's including AND's but am
a bit stumped.
I am fairly familiar with Arrays, but cannot seem to combine all.
I have a data table (as detailed below). I simply wish to calculate the
expected totals per month.
Any help & assistance with this would be most welcome.
Cheers,
Mathew

Note, earliest Start is 01/04/03
Start                 Finish                 DayRate          Apr-2003
May-2003         Jun-2003         Jul-2003         Aug-2003
01/04/2003                                  23.00
01/04/2003     09/07/2003           23.00
01/04/2003     30/07/2003           23.00
01/04/2003                                  23.00
29/04/2003                                  23.00
01/04/2003                                  23.00
01/04/2003                                  23.00
01/04/2003                                  23.00
01/04/2003                                  23.00
01/04/2003     09/04/2003           23.00
01/04/2003                                  23.00
01/04/2003                                  23.00
30/04/2003                                  23.00
29/05/2003     23/06/2003           23.00
19/05/2003     02/06/2003           23.00
26/06/2003                                  23.00
22/07/2003                                  23.00
07/07/2003     21/07/2003           23.00
01/04/2003     14/04/2003           23.00
22/04/2003     24/04/2003           23.00
14/04/2003     28/04/2003           23.00
01/04/2003                                  23.00
01/04/2003                                  23.00
14/04/2003     19/04/2003           23.00
12/05/2003     02/06/2003           23.00
23/05/2003     08/06/2003           23.00
12/05/2003     26/05/2003           23.00
19/05/2003     26/05/2003           23.00
27/05/2003     24/06/2003           23.00
19/05/2003     27/05/2003           23.00
30/06/2003     21/07/2003           23.00
09/06/2003                                  23.00
02/06/2003     09/06/2003           23.00
31/07/2003     24/08/2003           23.00
21/07/2003                                  23.00
09/07/2003     14/07/2003           23.00
14/07/2003     21/07/2003           23.00
07/07/2003     21/07/2003           23.00
28/07/2003     11/08/2003           23.00

Finish

```
 0
mbp1 (14)
8/19/2003 8:44:25 PM
excel.misc 78881 articles. 5 followers.

3 Replies
535 Views

Similar Articles

[PageSpeed] 42

```Mathew,

Your looking for a sum between dates so i'm assuming that
you want your sum to add up column C (Day Rate) when
the ?Start Date? falls between April 1 and April 30.  Or
did you want the sum based on the Finish Date?

Perhaps you could provide a sample output, just so that
we can verify our solutions work to your specifications.

Dan E

"Mathew P Bennett" <mbp1@btinternet.com> wrote in message news:bhu279\$gb0\$1@hercules.btinternet.com...
> Good Evening All,
> Many aplogies for the crappy formatting of my previous post, I have done it
> properly (I hope) now.
> I am really struggling here, have tried, nested IF's including AND's but am
> a bit stumped.
> I am fairly familiar with Arrays, but cannot seem to combine all.
> I have a data table (as detailed below). I simply wish to calculate the
> expected totals per month.
> Any help & assistance with this would be most welcome.
> Cheers,
> Mathew
>
> Note, earliest Start is 01/04/03
>       Start                 Finish                 DayRate          Apr-2003
> May-2003         Jun-2003         Jul-2003         Aug-2003
>       01/04/2003                                  23.00
>       01/04/2003     09/07/2003           23.00
>       01/04/2003     30/07/2003           23.00
>       01/04/2003                                  23.00
>       29/04/2003                                  23.00
>       01/04/2003                                  23.00
>       01/04/2003                                  23.00
>       01/04/2003                                  23.00
>       01/04/2003                                  23.00
>       01/04/2003     09/04/2003           23.00
>       01/04/2003                                  23.00
>       01/04/2003                                  23.00
>       30/04/2003                                  23.00
>       29/05/2003     23/06/2003           23.00
>       19/05/2003     02/06/2003           23.00
>       26/06/2003                                  23.00
>       22/07/2003                                  23.00
>       07/07/2003     21/07/2003           23.00
>       01/04/2003     14/04/2003           23.00
>       22/04/2003     24/04/2003           23.00
>       14/04/2003     28/04/2003           23.00
>       01/04/2003                                  23.00
>       01/04/2003                                  23.00
>       14/04/2003     19/04/2003           23.00
>       12/05/2003     02/06/2003           23.00
>       23/05/2003     08/06/2003           23.00
>       12/05/2003     26/05/2003           23.00
>       19/05/2003     26/05/2003           23.00
>       27/05/2003     24/06/2003           23.00
>       19/05/2003     27/05/2003           23.00
>       30/06/2003     21/07/2003           23.00
>       09/06/2003                                  23.00
>       02/06/2003     09/06/2003           23.00
>       31/07/2003     24/08/2003           23.00
>       21/07/2003                                  23.00
>       09/07/2003     14/07/2003           23.00
>       14/07/2003     21/07/2003           23.00
>       07/07/2003     21/07/2003           23.00
>       28/07/2003     11/08/2003           23.00
>
>
> Finish
>
>
>

```
 0
8/19/2003 9:22:57 PM
```Mathew,

=SUM(IF((IF(\$B2:\$B40<=(D\$1+29), IF(\$B2:\$B40<>"",\$B2:\$B40,D\$1+29), D\$1+29))-IF(\$A2:\$A40>=D1,\$A2:\$A40,D1) +1
>0,(IF(\$B2:\$B40<=(D\$1+29), IF(\$B2:\$B40<>"",\$B2:\$B40,D\$1+29), D\$1+29))-IF(\$A2:\$A40>=D1,\$A2:\$A40,D1) + 1,0)*\$C2:\$C40)

Watch out for line wrapping, it's one gigantic formula.
Note: built this formula for april (note the 29's - one day
less than in the month) change accordingly for different
months.

Thought i'd explain somewhat,
I assumed that a blank finish date means the project is
ongoing.  If a project spans two months it's broken up
(based on the # of days worked in each month)

Dan E

"Mathew P Bennett" <mbp1@btinternet.com> wrote in message news:bhu5t4\$lln\$1@titan.btinternet.com...
> Hi Dan, thank you for persevering with this.
> The intention being with the data table as amended below, simply a formula
> to provide, (Finish date - Start date +1)*DayRate , for per row for each
> month Apr-Aug on the header row.
> Cheers D
> Mathew

```
 0
8/20/2003 2:45:29 PM
```Don't know how I forgot, but . . .

That formula has to be array entered (control + shift + enter)

Dan E

"Dan E" <nospam.d.elliot@nospam.mailcity.com> wrote in message news:e#R62myZDHA.2632@TK2MSFTNGP09.phx.gbl...
> Mathew,
>
> =SUM(IF((IF(\$B2:\$B40<=(D\$1+29), IF(\$B2:\$B40<>"",\$B2:\$B40,D\$1+29), D\$1+29))-IF(\$A2:\$A40>=D1,\$A2:\$A40,D1) +1
> >0,(IF(\$B2:\$B40<=(D\$1+29), IF(\$B2:\$B40<>"",\$B2:\$B40,D\$1+29), D\$1+29))-IF(\$A2:\$A40>=D1,\$A2:\$A40,D1) + 1,0)*\$C2:\$C40)
>
> Watch out for line wrapping, it's one gigantic formula.
> Note: built this formula for april (note the 29's - one day
> less than in the month) change accordingly for different
> months.
>
> Thought i'd explain somewhat,
> I assumed that a blank finish date means the project is
> ongoing.  If a project spans two months it's broken up
> (based on the # of days worked in each month)
>
> Dan E
>
> "Mathew P Bennett" <mbp1@btinternet.com> wrote in message news:bhu5t4\$lln\$1@titan.btinternet.com...
> > Hi Dan, thank you for persevering with this.
> > The intention being with the data table as amended below, simply a formula
> > to provide, (Finish date - Start date +1)*DayRate , for per row for each
> > month Apr-Aug on the header row.
> > Cheers D
> > Mathew
>
>

```
 0
8/20/2003 2:56:35 PM

Similar Artilces:

Unable to Save in Publisher 2000 to Flash Drive
I work in a school district and one of our teachers uses Flash Drives/Memory Keys (whatever you want to call them) for her students to save their projets on. She's starting a unit on Microsoft Publisher and had the students open a template off the flash drive and change it and resave in a folder on the flash drive but all the students are getting the following error: "There is no disk in the floppy drive or the drive door is not closed. Please make sure that the floppy drive is ready, then try again." -It is not a permissions issue - even the teacher is unable to save to...

Excel button problem
Hi All I have a macro that copies a worksheet in the active workbook and puts it into a new workbook - then formats it and deletes any buttons on the worksheet. On the first click on the button the macro works ok. On the second click, it fails because the all assigned macros on all buttons in the active workbook changed from "mba" to "book1!mba". Book 1 doesn't exists (wasn't opened, wasn't saved, doesn't have the macros). I've never experienced this problem before?? Can anyone help to solve this problem? FYI The macro to do this is c...

I have a work book that is linked to another and vise versa. As thus: Workbook A is where the input of data is made; Workbook B has a link to the input from workbook A; Workbook A retrieves the altered data back as a link. Although this all works fine with both books open, I note that if I open workbook A by itself, that the data it retrieves from Workbook B is not updated . If However, both books are open, there's no problem. I thought linked books were updated automatically if the Update remote references has been selected?? But it appears that the second book is not updated until it ...

Need Help, Task Start Date is wrong
I’m using MS Project 2007, have several task linked with finish to start. I have set date to schedule from, hours per day set to 8 and Working Monday thru Friday. My schedule shows Task 1 Duration 4 days, start Wed 6/2/10, Finish Mon 6/7/10 Task 2 Duration 3 days, start Mon 6/7/10, Finish Thu 6/10/10 Task 2 should have a Start Date of 6/8/10 not 6/7/10; what is causing this? Thanks in advance for your help. ...

how to convert lookup values to the "display text"
I'm using an sql code (below) which uses a few lookup fields. Unfortunately in the datasheet view, I get the "bound values" instead of the "display values". How can I change the properties for the these lookup fields so I can see the "display values" from the datasheet view? SELECT [Funding],[Date],[Description],[Company],[Expense_Type],[Amount],[Status] FROM [Form_9_Status] UNION ALL SELECT [Funding],[Date],[Description],[Company],[Expense_Type],[Amount],[Status] FROM [TDY_Status] UNION ALL SELECT [Funding],[Date],[Description],[C...

Question -Problem
Has anybody ever seen an error message (0x800cccF6) message? I cannot configure my Outlook to retrieve Hotmail. Works with other profiles on this computer running winxp. Stan-The-Man-2006 wrote: > Has anybody ever seen an error message (0x800cccF6) message? I cannot > configure my Outlook to retrieve Hotmail. Works with other profiles > on this computer running winxp. If you have a free Hotmail account, note that it won't work anymore (even your other profiles will eventually have problems) - see http://www.slipstick.com/addins/services/online.htm#hotmail ...

Hello, One of my DC was disconnected from the network for quite a long time and cannot be synchronized with AD anymore. I have been trying to apply the http://support.microsoft.com/kb/325850/en-us procedure to reset the machine account password. After launching the command "netdom resetpwd /S: ....." I've got the following error message : "The machine account password for the local machine could not be reset. Echec d'ouverture de session : unknown user or incorrect password. The command failed to complete successfully." ANy idea to help me ? Man...

WCF Client serialization problem
I posted the problem on another forum, and to prevent duplicate posts, but get as many professionals as possible to look at it, I include the url in this post. Please help! http://stackoverflow.com/questions/2948657/migrating-webclient-to-wcf-wcf-client-serializes-parametername-of-method ...

Autonumber created.. problems in the future?
I managed to create an autonumber in Microsoft CRM. I did this by making a field "Number"(in the database "New_Number") and I published it on the form. Then I went To the SQL server and I changed the field in the table to Identity Yes, Identity seed 1, Identity Increment 1. I locked the field on the form. It worked! I think that this is not supported by Microsoft. But has anybody got any idea which troubles i could get with this configuration? San ________________________________ Do you know all add-ons for Microsoft CRM? Visit http://www.pimpmycrm.com The biggest dange...

More Columns #2
I am using all columns through IV on one of my worksheets. Does anyone know how to get more columns? Hi stacy know way using Excel. this is the maximum! -- Regards Frank Kabel Frankfurt, Germany Stacy Haskins wrote: > I am using all columns through IV on one of my > worksheets. Does anyone know how to get more columns? As Frank said, that's the maximum cols But maybe you could try transposing your table / data ? (Excel has a lot more rows than columns) If so, try: http://tinyurl.com/2nmyy for an example on using TRANSPOSE() For a one-time Tranpose: Copy > Paste Specia...

Problems with reallocations in the Advanced Budget
I am a using the Advanced Budget in Money and for years I have reallocated money between categories and months. recently when I updated my transactions all my real locations were wrong. Basically the money I allocated from March to February was not only back in February it reversed it and made it look like I sent Money from February to March so now any category that I have reallocated money (an that is most) is wrong. Does anyone know of a way to fix this, I have run the repair, but that did nothing. Microsoft Money Plus Premium Version 17.0.125.1415 I am so glad to see that I am...

Contacts in Exchange #2
We are running Exchange 2003 and Outlook 2003. I have tried to give a user rights to her boss's contacts through delegation and setting the rights on the contacts folder, however, while she has the rights she is unable to add or see her boss's contact folder in her Outlook. She can see it if she runs a search, but can not permanently put it in her list of contact folders. IS there a way that I can accomplish this through the back-end? Thanks, Joseph rapoport jrapoport@insurmark.net ...

message delivery problems
Hello! There are several email address that when I send them an e-mail, they just sit in the Queue. I did message tracking and its telling me that "Message Routed and Queued for Remote Delivery". Can anyone suggest symptoms for this? Thank You! usually messages sitting in outgoing queue take time due to DNS related issues. Do you have issues performing NSlookups on any domains from your workstation? Can you perform the same NSlookups from the exchange server? From the exchange server, can you perform smtp communication directly to the mailserver that would receive the e...

How to delete a set of rows depending on Value
I have two worksheets Worksheet A 27 Columns 1600 Rows. Worksheet B 1 Column 200 Rows I need Worksheet A to look at each cell in Worksheet B, if a cell exists in Worksheet A, then I need the row deleted... Basically I have a list of Grand list of items to do, then a list of items already completed. I need to now remove all entries in the grand list that have been completed. Is this feasible or should I look at using some Unix script. It sounds like you could use VLOOKUP to find out if the value in B exists on A: http://www.officearticles.com/excel/vlookup_formulas_in_microsoft_excel....

Offline Synchronization Problem #2
I get the following error when I try going offline. The excelption is taken from Event Viewer of the Client Machine. Event Type: Error Event Source: MSCRMOfflineSync Event Category: None Event ID: 6000 Date: 3/25/2008 Time: 5:03:33 PM User: N/A Computer: WINXP Description: An error occurred during Offline Synchronization. Try going offline again, or restart Microsoft Outlook. saInsert failed for entity 'ActivityMimeAttachment', batchRows=0 with exception System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument li...

'top' is not a valid value for the 'vertical-align' property.
Well, it is, actually, and the resulting .chm file works properly in HTML Help. But it's a bit tedious getting that wrong useless error message from VS2002 on every build. (Well, not every build, it only does it sometimes actually.) Any idea how I can persuade it to stop telling me this? -- Tim Ward Brett Ward Limited - www.brettward.co.uk ...

Having problem with spoofing email
Our users just received multiple email from different users outside the company. In the To: line, it shows his user name correctly but when he print those email, the To: line was showing somebody else name on the print out. Is there a way to block this behavior? I'm using E2k3. For some reason our spam (postini) didn't pick up these emails. Thank you, Could you please post the message in raw format (including the mail headers) Petch wrote: > Our users just received multiple email from different users outside the > company. In the To: line, it shows his user name cor...

outlook 97 and express email problems
Hi, I am currently on an IBM X21 laptop and is running windows 98 se with office 97 pro. I recently experienced some problems with outlook (illegal operations etc) and reinstalled office to fix the problem but since then I have not been able to send or recieve emails with outlook 97 and outlook express 6. I simply get an error message saying the host can't be found (but does exist and I can ping it successfully). Any suggestions on what I might do? I have tried creating new accounts in windows mail and outlook express, but I still get the same error. Thankyou in advance! Tim D...

Disk drive order
Hello, How to make my disk driver appear as C: (Its a virtual boot drive) and enumerate the other disk accordingly? The physical disk is always enumerate first, and windows think he is C: Thanks Guilherme You are out of luck, physical devices are always enumerated first. This has been true since Windows 2000. -- Don Burn (MVP, Windows DKD) Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr Remove StopSpam to reply "Guilherme Moro" <guilherme.moro@gmail.com> wrote in message news:7f0...

Problem with Range
Hello All, Using Windows & Excel XP. I have a worksheet that has times located in every other column, A1:A30, C1:C30, E1:E30. I then name the range "times". I want to find the count of times that are between 0:30:00 and 0:39:59 (30 and 39:59 minutes). I write the formula: =COUNTIF(times,">=" & TIME(0,30,0)) - COUNTIF(times,">=" & TIME(0,39,59)) but get the error #VALUE! I have tried writing a formula for times in one column and consecutive columns and it gives the correct count, it is just when the times in every other column that th...

default values in a cell
Hello, can you help me please Cell B1 contains a complex mathematical formula which requires (in several places) a number from cell A1. Cell A1 can contain any integer number, but it is usually the same (30). I would like to be able to leave cell A1 empty, and only enter a number when it is not 30 , ie the default value of A1 is 30, unless specified. How do I go about this ? Should I look at conditional formatting, or put lots of IF functions into an already complex formula? Thank as always KK Use 2 cells Modify the complex formula to use B1 rather than A1 ( or any other un-u...

Goal Seek #2
Can anyone tell me a little about goal seek? Hi basically it's used to change an input variable so that the result of the formula equals what you want it to ... say i have the following A B C 1 10 20 =A1+B1 now C1 will give me 30, but if i want to know what B1 will need to be if i want C1 to show 50, i can use goal seek Set C1 to value of 50 by changing B1 Hope this helps Cheers JulieD "Jamie Hart" <jhart@emaple.net> wrote in message news:u3OscELdEHA.244@TK2MSFTNGP12.phx.gbl... > Can a...

How do I Remove a Split from my Comments in Excel 2003? #2
I have set my current workbook to split/freeze the first column and first 2 rows. Now, when I add a comment to the second row (in any column) my comments are cut off if I should scroll down. I don't ever remember the behavior before. And I don't know what I've done to enable it but it's really annoying. How do turn this off ? ...

Increment A2 from A1 and A2 Sum #2
I have two cells: A1 - manual value B1 - automatic increment = B1 + A1 How can i make it? (=error: circular reference) Note: I have this formula repeated in some lines: = B2 + A2 = B3 + A3 .. -- Message posted from http://www.ExcelForum.com ...

Show date, time & day of week in one cell
Can I show the date, time and day of week in one cell. I have: 09/03/07 8:30 AM in one cell using the format (Format/Cells/Custom): [\$-409]mm/dd/yy h:mm AM/PM;@ Excel refuses to accept ddd for Mon or dddd Monday at the end of the format I want it to read: 09/03/07 8:30 AM Monday in 1 cell. I have Excel 2003. One way: mm/dd/yy h:mm AM/PM dddd;@ In article <Xns99B8A3CAF9130pencilunlistedcom@208.49.82.220>, Burp <burp@beep.comINVALID> wrote: > Can I show the date, time and day of week in one cell. > > I have: > 09/03/07 8:30 AM > in one cell using the for...