Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default vlookup with two data points.

Ok...I am not sure how to set up this formula.

Sheet 1: Column A:Employee ID # B:Effective Dates
Sheet 2: Column A:Employee ID # B:Effective Dates C:Change Reasons

Example Data:
Sheet 1:

Employee ID Effective Date Change Reasons
11734 3/23/2009
11734 12/16/2008
11734 12/1/2008
20045 6/5/2008

Sheet 2:

Employee ID Effective Date Change Reason
11734 3/23/2009 New Hire
11734 12/1/2008 Manager Change

I need to be able to get the 'Change Reasons' in Sheet 1 if the Employee ID
and Effective Dates are the same on both sheets.

Normal, I would do a vlookup, but since two items have to true, I am not
sure how to pull the data. Any advice is much appreciated. Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
KC KC is offline
external usenet poster
 
Posts: 94
Default vlookup with two data points.

in Sheet1 colum C2 use this formula and drag it to all other below cells!

=IF(VLOOKUP(A2,Sheet2!$A$2:$C$3,2,FALSE)=B2,VLOOKU P(A2,Sheet2!$A$2:$C$3,3,FALSE),"")

-kc
*Click YES if this works

"DataGuy" wrote:

Ok...I am not sure how to set up this formula.

Sheet 1: Column A:Employee ID # B:Effective Dates
Sheet 2: Column A:Employee ID # B:Effective Dates C:Change Reasons

Example Data:
Sheet 1:

Employee ID Effective Date Change Reasons
11734 3/23/2009
11734 12/16/2008
11734 12/1/2008
20045 6/5/2008

Sheet 2:

Employee ID Effective Date Change Reason
11734 3/23/2009 New Hire
11734 12/1/2008 Manager Change

I need to be able to get the 'Change Reasons' in Sheet 1 if the Employee ID
and Effective Dates are the same on both sheets.

Normal, I would do a vlookup, but since two items have to true, I am not
sure how to pull the data. Any advice is much appreciated. Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default vlookup with two data points.

Hi KC,

The formula did not work.

I copied the formula as is and it only pasted the 'New Hire' reason in C2 on
sheet1. It did not paste the 'Manager Change' in C4 next to the effective
date of 12/1/08 in sheet1. I got a #N/A in C5, which I expected since 20045
employee ID number does not exist in Sheet2.

Any other suggestions?
Thanks, Casey

"KC" wrote:

in Sheet1 colum C2 use this formula and drag it to all other below cells!

=IF(VLOOKUP(A2,Sheet2!$A$2:$C$3,2,FALSE)=B2,VLOOKU P(A2,Sheet2!$A$2:$C$3,3,FALSE),"")

-kc
*Click YES if this works

"DataGuy" wrote:

Ok...I am not sure how to set up this formula.

Sheet 1: Column A:Employee ID # B:Effective Dates
Sheet 2: Column A:Employee ID # B:Effective Dates C:Change Reasons

Example Data:
Sheet 1:

Employee ID Effective Date Change Reasons
11734 3/23/2009
11734 12/16/2008
11734 12/1/2008
20045 6/5/2008

Sheet 2:

Employee ID Effective Date Change Reason
11734 3/23/2009 New Hire
11734 12/1/2008 Manager Change

I need to be able to get the 'Change Reasons' in Sheet 1 if the Employee ID
and Effective Dates are the same on both sheets.

Normal, I would do a vlookup, but since two items have to true, I am not
sure how to pull the data. Any advice is much appreciated. Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 96
Default vlookup with two data points.

maybe try adding a column that concatenates the employee id and effective
date, and then base the vlookup off of that column?





"DataGuy" wrote:

Hi KC,

The formula did not work.

I copied the formula as is and it only pasted the 'New Hire' reason in C2 on
sheet1. It did not paste the 'Manager Change' in C4 next to the effective
date of 12/1/08 in sheet1. I got a #N/A in C5, which I expected since 20045
employee ID number does not exist in Sheet2.

Any other suggestions?
Thanks, Casey

"KC" wrote:

in Sheet1 colum C2 use this formula and drag it to all other below cells!

=IF(VLOOKUP(A2,Sheet2!$A$2:$C$3,2,FALSE)=B2,VLOOKU P(A2,Sheet2!$A$2:$C$3,3,FALSE),"")

-kc
*Click YES if this works

"DataGuy" wrote:

Ok...I am not sure how to set up this formula.

Sheet 1: Column A:Employee ID # B:Effective Dates
Sheet 2: Column A:Employee ID # B:Effective Dates C:Change Reasons

Example Data:
Sheet 1:

Employee ID Effective Date Change Reasons
11734 3/23/2009
11734 12/16/2008
11734 12/1/2008
20045 6/5/2008

Sheet 2:

Employee ID Effective Date Change Reason
11734 3/23/2009 New Hire
11734 12/1/2008 Manager Change

I need to be able to get the 'Change Reasons' in Sheet 1 if the Employee ID
and Effective Dates are the same on both sheets.

Normal, I would do a vlookup, but since two items have to true, I am not
sure how to pull the data. Any advice is much appreciated. Thanks.

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
How select all data points/data labels at once (to format)? kippers Charts and Charting in Excel 3 April 4th 23 12:39 PM
connect line to data points with missing data in between ziak Charts and Charting in Excel 4 April 4th 23 10:35 AM
no data printed in chart with more than 2709 data points longzoo Charts and Charting in Excel 0 November 17th 09 09:50 PM
Formatting data series - line between certain data points only alan_m Charts and Charting in Excel 0 September 20th 07 05:16 PM
excel 2007, how to select a data point and cycle through data points [email protected] Charts and Charting in Excel 5 September 4th 07 12:29 PM


All times are GMT +1. The time now is 04:06 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"