ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Calculations with date time interval (https://www.excelbanter.com/excel-worksheet-functions/46740-calculations-date-time-interval.html)

Todd F.

Calculations with date time interval
 
I have a date time value in a cell

It appears in cell as "1/1/04 18:00

In formula bar it appears as " 1/1/2004 6:00:55 PM

I need to do calcs on this in excel - if date is = " another date I try
toi enter" then good, bad

not having any luck

thanks for your time.

Bob Phillips

=IF(INT(that_date)=another_date,"good","bad")

--
HTH

Bob Phillips

"Todd F." wrote in message
...
I have a date time value in a cell

It appears in cell as "1/1/04 18:00

In formula bar it appears as " 1/1/2004 6:00:55 PM

I need to do calcs on this in excel - if date is = " another date I try
toi enter" then good, bad

not having any luck

thanks for your time.




Gary''s Student

Make sure your IF() is O.K.

Example
A1 is 9/22/2005 13:18
B1 is 9/22/2005 19:20
C1 has =IF(B1=A1,1,2)
and returns 1
--
Gary''s Student


"Todd F." wrote:

I have a date time value in a cell

It appears in cell as "1/1/04 18:00

In formula bar it appears as " 1/1/2004 6:00:55 PM

I need to do calcs on this in excel - if date is = " another date I try
toi enter" then good, bad

not having any luck

thanks for your time.


Ron Rosenfeld

On Thu, 22 Sep 2005 09:56:02 -0700, "Todd F."
wrote:

I have a date time value in a cell

It appears in cell as "1/1/04 18:00

In formula bar it appears as " 1/1/2004 6:00:55 PM

I need to do calcs on this in excel - if date is = " another date I try
toi enter" then good, bad

not having any luck

thanks for your time.


Assume your date is in A1 and the date you are comparing it to is in A2 and is
just a date (i.e. -- no time portion).

=IF(INT(A1)A2,"good","bad")


--ron

Todd F.

thanks I got it to work as well but not in the if box - just straight in the
cell

"Gary''s Student" wrote:

Make sure your IF() is O.K.

Example
A1 is 9/22/2005 13:18
B1 is 9/22/2005 19:20
C1 has =IF(B1=A1,1,2)
and returns 1
--
Gary''s Student


"Todd F." wrote:

I have a date time value in a cell

It appears in cell as "1/1/04 18:00

In formula bar it appears as " 1/1/2004 6:00:55 PM

I need to do calcs on this in excel - if date is = " another date I try
toi enter" then good, bad

not having any luck

thanks for your time.


Todd F.

thanks now I am going to try an nested if

"Bob Phillips" wrote:

=IF(INT(that_date)=another_date,"good","bad")

--
HTH

Bob Phillips

"Todd F." wrote in message
...
I have a date time value in a cell

It appears in cell as "1/1/04 18:00

In formula bar it appears as " 1/1/2004 6:00:55 PM

I need to do calcs on this in excel - if date is = " another date I try
toi enter" then good, bad

not having any luck

thanks for your time.





Todd F.

thanks

"Ron Rosenfeld" wrote:

On Thu, 22 Sep 2005 09:56:02 -0700, "Todd F."
wrote:

I have a date time value in a cell

It appears in cell as "1/1/04 18:00

In formula bar it appears as " 1/1/2004 6:00:55 PM

I need to do calcs on this in excel - if date is = " another date I try
toi enter" then good, bad

not having any luck

thanks for your time.


Assume your date is in A1 and the date you are comparing it to is in A2 and is
just a date (i.e. -- no time portion).

=IF(INT(A1)A2,"good","bad")


--ron



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

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