Search EggHeadCafe's Job Board
EggHeadCafe Silverlight WPF ASP.NET VB.NET C# Excel SQL Server SharePoint
search
MicrosoftArticlesForumsFAQs
C# .NET
VB.NET
Visual Studio .NET
ADO.NET
Xml / Xslt
VB 6.0
.NET CF
GDI+
LINQ
Deployment
Security
FoxPro
Silverlight / WPF
Entity Framework
RIA Services

WebArticlesForumsFAQs
JavaScript
ASP
ASP.NET
WCF

DatabasesArticlesForumsFAQs
SQL Server
Access
Oracle
MySQL
Other Databases

OfficeArticlesForumsFAQs
Excel
Word
Powerpoint
Outlook
Publisher
Money

Non-MicrosoftArticlesForumsFAQs
NHibernate
Perl
PHP
Ruby
Java
Linux / Unix
Apple
Open Source

Operating SysArticlesForumsFAQs
Windows 7
Windows Server
Windows Vista
Windows XP
Windows Update
MAC
Linux / UNIX

Server PlatformsArticlesForumsFAQs
BizTalk
Site Server
Exhange Server
IIS

Graphic DesignArticlesForumsFAQs
Macromedia Flash
Adobe PhotoShop
Expression Blend
Expression Design
Expression Web

OtherArticlesForumsFAQs
Lounge
Subversion / CVS
Ask Dr. Dotnetsky
Active Directory
Networking
Uninstall Virus
Job Openings
Product Reviews
Search Engines
Resumes

 

  View Other Microsoft Excel Posts   Ask New Question  Ask New Question With Power Editor

Adding Days in Excel
randyrr stuff posted at Tuesday, November 03, 2009 1:14 PM

Hi Guys,

I'm trying to add 2 columns in excel for Work Breakdown Structure

for E.g

* - current cell formatting

              *(number)         *(date)             *(date)
                 A                 B                       C
                 Duration      Start Date          End Date
1              3                   21/10/09          24/10/09
2              2.5                21/10/09         24/10/09 and not 23/10/09 hh:mm

A1 + B1 = C1 is fine, however how do i get C2 to display '24/10/09' ??
i.e anything that has '.5' is carried over to the following day.

what formula can I use...

I'm using Excel 2007                                    


Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0
RE: Adding Days in Excel
Jonathan VH provided a rated reply to randyrr stuff on Tuesday, November 03, 2009 1:26 PM

If you mean any decimal part .5 and above and any decimal part less than .5 rounded down, you could use the ROUND function, e.g. this in cell C1:

=ROUND(A1,0)+B1

If you want any fraction rounded up to a whole day, use CEILING or ROUNDUP.

Reply    Reply Using Power Editor
  Rank Winnings Points
November 2 $212.00 548
October 2 $171.00 584

RE: Adding Days in Excel
randyrr stuff replied to Jonathan VH on Wednesday, November 04, 2009 10:02 AM

Hi Jonathan,

When I used the Round formula, the result column now has  1/19/1900

Hos is that???
Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

RE: RE: Adding Days in Excel
Jonathan VH replied to randyrr stuff on Wednesday, November 04, 2009 10:40 AM

You're adding the wrong values. In your example, this formula would be in cell C1:

=ROUND(A1)+B1

Reply    Reply Using Power Editor
  Rank Winnings Points
November 2 $212.00 548
October 2 $171.00 584

RE: Adding Days in Excel
randyrr stuff replied to Jonathan VH on Wednesday, November 04, 2009 1:37 PM

Hi Jonathan,

I've tried what you have suggested, but it says "you have entered too few arguments for this function",

So i'm kinda stumped.

Randyrr
Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

RE: RE: Adding Days in Excel
Jonathan VH provided a rated reply to randyrr stuff on Wednesday, November 04, 2009 4:35 PM

Oops. Use the first formula I posted, not that last one. The zero is necessary to tell Excel what decimal place to round on.
Reply    Reply Using Power Editor
  Rank Winnings Points
November 2 $212.00 548
October 2 $171.00 584

RE: Adding Days in Excel
randyrr stuff replied to Jonathan VH on Wednesday, November 04, 2009 7:26 PM

Thank you Jonathan,

It worked beautifully!!

I have another question, quite similar too...

If i have:
                                         (date)
                                            A                                    B                       C
            1                   9/07/09 - 9/14/07           ????? - ??????                                      
                                                                        
    How do i get cell B2, to display the range 9/15/09 - 9/22/09  and so on?                                                                           

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

RE: RE: Adding Days in Excel
Jonathan VH provided a rated reply to randyrr stuff on Wednesday, November 04, 2009 8:07 PM

Do you really need eight-day ranges rather than weeks?

I suggest using a (hidden?) cell with the beginning date. That way you can change that cell and the range will adjust. I used cell A17 in this example.

Put this in A1:

=TEXT($A$17+ 8*(COLUMN()-COLUMN($A1)),"m/d/yyyy")&" - "&TEXT($A$17-1+8*(COLUMN()-COLUMN($A1)+1),"m/d/yyyy")

Then you can just copy it to the right.

 

 

Reply    Reply Using Power Editor
  Rank Winnings Points
November 2 $212.00 548
October 2 $171.00 584

RE: Adding Days in Excel
randyrr stuff replied to Jonathan VH on Wednesday, November 04, 2009 8:43 PM

Ohhhh,

Sorry Jonathan, I need columns that displays a week ( formatted in ranges, e.g 9/17/09 - 7/24/09 and so on)for 26 weeks (1 week per column)...


Randy
Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0

RE: RE: Adding Days in Excel
Jonathan VH provided a rated reply to randyrr stuff on Wednesday, November 04, 2009 8:54 PM

All your examples (including 9/17/09 - 7/24/09) show eight-day periods...

For one-week periods, again using A17 as the start date, use this formula in A1 and then just copy it across the next 25 columns:

=TEXT($A$17+ 7*(COLUMN()-COLUMN($A1)),"m/d/yyyy")&" - "&TEXT($A$17-1+7*(COLUMN()-COLUMN($A1)+1),"m/d/yyyy")

If you start in some cell other than A1, change the $A1 reference to that of the starting cell.

Reply    Reply Using Power Editor
  Rank Winnings Points
November 2 $212.00 548
October 2 $171.00 584

RE: RE: Adding Days in Excel
Jonathan VH replied to Jonathan VH on Wednesday, November 04, 2009 8:56 PM

For two-digit years, just change the "m/d/yyyy" format string to "m/d/yy" in the TEXT functions.
Reply    Reply Using Power Editor
  Rank Winnings Points
November 2 $212.00 548
October 2 $171.00 584

RE: Adding Days in Excel
randyrr stuff replied to Jonathan VH on Wednesday, November 04, 2009 9:01 PM

Waw Jonathan,

Sorry, i forgot, i made the adjustments already when u told me the first time, i was just unable to post this to let u know....

This has worked beautifully, I can't thank you enough!!!

Thanks again!!

randyrr



(I hope u don't mind, should i come again with other questions... :) )

Reply    Reply Using Power Editor
  Rank Winnings Points
November 0 $0.00 0
October 0 $0.00 0