Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I compare two dBs(spreadsheets) based on multiple criteria?

Ok, so here's the rundown...

2 seperate databases (and by db's I mean spreadsheets)... one dB has the
information for the start time/end time/date/location of medical
staff(nationwide). The second dB is a nation wide index of all of the
accidents that lists time/location/date and other remarks. What I am looking
to do is make 1 cell(on the accident dB) that references the medical staff dB
and tells me if the accident occured between the hours that a medical staffer
was on duty. A simple Yes or No is all that I'm looking for, but it's gotta
match the date, city, and reference between the work hours. The staff dB is
expected to be around 3000 lines and the accident db around 5000. Please Help
me!!!


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default How do I compare two dBs(spreadsheets) based on multiple criteria?

Assume Sheet1 (Medical Staff) has the following:

Col A : Start time
Col B : End time
Col C : Date
Col D : Location

Sheet2 (Acccidents):

col A : Accident Time
Col B : Location
Col C : Date

In Col D (Sheet2 - and assuming data starts in row 2) put:

=IF(SUMPRODUCT(--(Sheet1!D2:D20=B2),--(Sheet1!C2:C20=C2),--(A2=Sheet1!A2:A20),--(A2<=Sheet1!B2:B20))0,"Y","N")

and copy down.

Obviously adjust ranges to suit your requirement.

HTH

"Zac-Diggity" wrote:

Ok, so here's the rundown...

2 seperate databases (and by db's I mean spreadsheets)... one dB has the
information for the start time/end time/date/location of medical
staff(nationwide). The second dB is a nation wide index of all of the
accidents that lists time/location/date and other remarks. What I am looking
to do is make 1 cell(on the accident dB) that references the medical staff dB
and tells me if the accident occured between the hours that a medical staffer
was on duty. A simple Yes or No is all that I'm looking for, but it's gotta
match the date, city, and reference between the work hours. The staff dB is
expected to be around 3000 lines and the accident db around 5000. Please Help
me!!!


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How do I compare two dBs(spreadsheets) based on multiple crite

Toppers... you rock! Thank your very much. I would have never guessed
SUMPRODUCT.



"Toppers" wrote:

Assume Sheet1 (Medical Staff) has the following:

Col A : Start time
Col B : End time
Col C : Date
Col D : Location

Sheet2 (Acccidents):

col A : Accident Time
Col B : Location
Col C : Date

In Col D (Sheet2 - and assuming data starts in row 2) put:

=IF(SUMPRODUCT(--(Sheet1!D2:D20=B2),--(Sheet1!C2:C20=C2),--(A2=Sheet1!A2:A20),--(A2<=Sheet1!B2:B20))0,"Y","N")

and copy down.

Obviously adjust ranges to suit your requirement.

HTH

"Zac-Diggity" wrote:

Ok, so here's the rundown...

2 seperate databases (and by db's I mean spreadsheets)... one dB has the
information for the start time/end time/date/location of medical
staff(nationwide). The second dB is a nation wide index of all of the
accidents that lists time/location/date and other remarks. What I am looking
to do is make 1 cell(on the accident dB) that references the medical staff dB
and tells me if the accident occured between the hours that a medical staffer
was on duty. A simple Yes or No is all that I'm looking for, but it's gotta
match the date, city, and reference between the work hours. The staff dB is
expected to be around 3000 lines and the accident db around 5000. Please Help
me!!!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
sum based on multiple criteria Todd Excel Worksheet Functions 3 May 5th 06 10:06 PM
Counting based on multiple criteria cubsfan Excel Discussion (Misc queries) 1 April 21st 06 03:58 PM
Counting by multiple criteria Risky Dave Excel Worksheet Functions 4 September 28th 05 01:29 PM
Counting rows based on criteria in multiple cells Margaret Excel Discussion (Misc queries) 11 December 2nd 04 11:04 PM
Count rows based on multiple criteria Murph Excel Worksheet Functions 1 October 28th 04 07:13 AM


All times are GMT +1. The time now is 12:36 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"