ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Comparing Dates (https://www.excelbanter.com/excel-discussion-misc-queries/159803-comparing-dates.html)

fubdap

Comparing Dates
 
I have 2 sheets. Sheet #1(Terminted Employees) has employee ids, names,
termination date, etc. Sheet#2 (New Hires) has employee ids, names, hire
date, etc. I will like to compare the dates in the 2 sheets. I need a
formula that will look at the termination date and the hire date. If the
termination date is earlier than the hire date, then it is not Ok. If the
termination date is later, then it is ok. I used the following formula but
I am not getting the desired result.
=IF(D3<Hires!E$2:E$975, "OK", "Not OK").
The formula is not comparing the same employee on both sheets.

Any help would be appreciated

Thanks
--
Fubdap

Sandy Mann

Comparing Dates
 
Assuming that the ids are in Column B then try:

=IF(SUMPRODUCT((Hires!B3:B975=B3)*(Hires!E3:E975D 3)),"OK","Not OK")

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"fubdap" wrote in message
...
I have 2 sheets. Sheet #1(Terminted Employees) has employee ids, names,
termination date, etc. Sheet#2 (New Hires) has employee ids, names, hire
date, etc. I will like to compare the dates in the 2 sheets. I need a
formula that will look at the termination date and the hire date. If the
termination date is earlier than the hire date, then it is not Ok. If the
termination date is later, then it is ok. I used the following formula
but
I am not getting the desired result.
=IF(D3<Hires!E$2:E$975, "OK", "Not OK").
The formula is not comparing the same employee on both sheets.

Any help would be appreciated

Thanks
--
Fubdap




fubdap

Comparing Dates
 
Thanks for your help Sandy!
--
Fubdap


"Sandy Mann" wrote:

Assuming that the ids are in Column B then try:

=IF(SUMPRODUCT((Hires!B3:B975=B3)*(Hires!E3:E975D 3)),"OK","Not OK")

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"fubdap" wrote in message
...
I have 2 sheets. Sheet #1(Terminted Employees) has employee ids, names,
termination date, etc. Sheet#2 (New Hires) has employee ids, names, hire
date, etc. I will like to compare the dates in the 2 sheets. I need a
formula that will look at the termination date and the hire date. If the
termination date is earlier than the hire date, then it is not Ok. If the
termination date is later, then it is ok. I used the following formula
but
I am not getting the desired result.
=IF(D3<Hires!E$2:E$975, "OK", "Not OK").
The formula is not comparing the same employee on both sheets.

Any help would be appreciated

Thanks
--
Fubdap





Sandy Mann

Comparing Dates
 
You're welcome, thanks for the feedback.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"fubdap" wrote in message
...
Thanks for your help Sandy!
--
Fubdap


"Sandy Mann" wrote:

Assuming that the ids are in Column B then try:

=IF(SUMPRODUCT((Hires!B3:B975=B3)*(Hires!E3:E975D 3)),"OK","Not OK")

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"fubdap" wrote in message
...
I have 2 sheets. Sheet #1(Terminted Employees) has employee ids, names,
termination date, etc. Sheet#2 (New Hires) has employee ids, names,
hire
date, etc. I will like to compare the dates in the 2 sheets. I need a
formula that will look at the termination date and the hire date. If
the
termination date is earlier than the hire date, then it is not Ok. If
the
termination date is later, then it is ok. I used the following
formula
but
I am not getting the desired result.
=IF(D3<Hires!E$2:E$975, "OK", "Not OK").
The formula is not comparing the same employee on both sheets.

Any help would be appreciated

Thanks
--
Fubdap









All times are GMT +1. The time now is 03:10 PM.

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