Counting dates including the beginning date.
I am trying to set up a formula to count days from start date to end date
including the start day. I have a total of 30 date sets that I need to track and total. I have used =SUM(B3-A3)+1 and it accomplishes the task, but it also adds 1 for every set regardless of the presence of dates in the cells. I need it to only add what has been entered. Any help is greatly appreciated. |
Counting dates including the beginning date.
Try this:
=(COUNT(A3:B3)=2)*(B3-A3+1) -- Biff Microsoft Excel MVP "chapy354" wrote in message ... I am trying to set up a formula to count days from start date to end date including the start day. I have a total of 30 date sets that I need to track and total. I have used =SUM(B3-A3)+1 and it accomplishes the task, but it also adds 1 for every set regardless of the presence of dates in the cells. I need it to only add what has been entered. Any help is greatly appreciated. |
Counting dates including the beginning date.
You don't need the SUM function to subtract two cell values SUM(B3-A3) is
the same as B3-A3. As for you +1 problem, try this... =IF(AND(A3<"",B3<""),B3-A3,"") Rick "chapy354" wrote in message ... I am trying to set up a formula to count days from start date to end date including the start day. I have a total of 30 date sets that I need to track and total. I have used =SUM(B3-A3)+1 and it accomplishes the task, but it also adds 1 for every set regardless of the presence of dates in the cells. I need it to only add what has been entered. Any help is greatly appreciated. |
All times are GMT +1. The time now is 08:55 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com