ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Excel - date comparison (https://www.excelbanter.com/excel-discussion-misc-queries/35936-excel-date-comparison.html)

stormsailor

Excel - date comparison
 
I have 2 columns, "received" and "shipped to customer", in standard date
format. I want to show a third column that shows the number of days in
between. I know I subtract one from the other. However, I also have blanks
in the shipped column for product that has not yet shipped out. For days
between the columns, I want it to treat blank cells as today's date. How do
I do this?

Raj

Hi Stormsailor

Try this formulae (assuming received date is in A1 cell and shipped date is
in B1 cell). in C1 where you need the difference try this formulae

=IF(B1="",TODAY()-A1,B1-A1)

This shall suffice your requirement.

Regards,
Raj

"stormsailor" wrote:

I have 2 columns, "received" and "shipped to customer", in standard date
format. I want to show a third column that shows the number of days in
between. I know I subtract one from the other. However, I also have blanks
in the shipped column for product that has not yet shipped out. For days
between the columns, I want it to treat blank cells as today's date. How do
I do this?


stormsailor

Thanks, Raj. That worked. My night is saved.

"Raj" wrote:

Hi Stormsailor

Try this formulae (assuming received date is in A1 cell and shipped date is
in B1 cell). in C1 where you need the difference try this formulae

=IF(B1="",TODAY()-A1,B1-A1)

This shall suffice your requirement.

Regards,
Raj

"stormsailor" wrote:

I have 2 columns, "received" and "shipped to customer", in standard date
format. I want to show a third column that shows the number of days in
between. I know I subtract one from the other. However, I also have blanks
in the shipped column for product that has not yet shipped out. For days
between the columns, I want it to treat blank cells as today's date. How do
I do this?



All times are GMT +1. The time now is 11:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com