Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
macshimi
 
Posts: n/a
Default Lookup Two Columns - Again

I recently posted a question that Vito answered very well, however, my data
is more complicated than I originally explained.

Here is my revised problem:

I have one spreadsheet that contains MONTHLY pension payments with Employee
ID, the Monthly Pay Date and various Pensions details.

In the second spreadsheet I have a column of Employee ID (Note that the
Employee ID can differ only by an alpha character), a second with Pay Incease
Date and a third column with New Pay Rate; as show below:
Employee Increase Date Pay Rate
764753 24-May-01 9,531.60
764753 24-May-02 10,038.60
764753 23-Jun-02 11,823.24
764753 24-Jun-02 10,038.60
764753 01-Sep-02 10,565.88
764753 22-Sep-02 12,431.64
764753 24-May-03 12,634.44
764753M 15-Sep-01 4,612.14
764753M 09-Jun-02 4,612.14
764753M 15-Sep-02 5,105.62
764753M 09-Dec-02 10,141.30
764761 21-May-01 15,500.00
764761 01-Jun-02 17,000.00
764761 01-Sep-02 17,385.00
764761 01-Sep-03 17,907.00
764761 01-Sep-04 19,000.00
764761 01-Aug-05 24,000.00
764761B 05-Dec-04 9,775.35
764761M 01-May-02 27,000.00
764761M 01-Sep-02 28,000.00

Say I have Employee 764761B with a paydate of 30-Jan-02, I need to find the
LAST pay increase (the CUREENT rate), in this case 9,775.35.

Thanks in advance your the always excellent help given.

Charles


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Lookup Two Columns - Again

=INDEX(C1:C21,MATCH(MAX(IF(A1:A21="764761B",B1:B21 )),B1:B21,0))

as an array formula, so commit with Ctrl-Shift-Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"macshimi" wrote in message
...
I recently posted a question that Vito answered very well, however, my

data
is more complicated than I originally explained.

Here is my revised problem:

I have one spreadsheet that contains MONTHLY pension payments with

Employee
ID, the Monthly Pay Date and various Pensions details.

In the second spreadsheet I have a column of Employee ID (Note that the
Employee ID can differ only by an alpha character), a second with Pay

Incease
Date and a third column with New Pay Rate; as show below:
Employee Increase Date Pay Rate
764753 24-May-01 9,531.60
764753 24-May-02 10,038.60
764753 23-Jun-02 11,823.24
764753 24-Jun-02 10,038.60
764753 01-Sep-02 10,565.88
764753 22-Sep-02 12,431.64
764753 24-May-03 12,634.44
764753M 15-Sep-01 4,612.14
764753M 09-Jun-02 4,612.14
764753M 15-Sep-02 5,105.62
764753M 09-Dec-02 10,141.30
764761 21-May-01 15,500.00
764761 01-Jun-02 17,000.00
764761 01-Sep-02 17,385.00
764761 01-Sep-03 17,907.00
764761 01-Sep-04 19,000.00
764761 01-Aug-05 24,000.00
764761B 05-Dec-04 9,775.35
764761M 01-May-02 27,000.00
764761M 01-Sep-02 28,000.00

Say I have Employee 764761B with a paydate of 30-Jan-02, I need to find

the
LAST pay increase (the CUREENT rate), in this case 9,775.35.

Thanks in advance your the always excellent help given.

Charles




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
macshimi
 
Posts: n/a
Default Lookup Two Columns - Again

Hi Bob

This works on the sample, I will try it on the entire spreadsheet, thousands
of entries.

Thanks very much, you guys on this newsgroup are life-savers!

Regards

Charles

"Bob Phillips" wrote:

=INDEX(C1:C21,MATCH(MAX(IF(A1:A21="764761B",B1:B21 )),B1:B21,0))

as an array formula, so commit with Ctrl-Shift-Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"macshimi" wrote in message
...
I recently posted a question that Vito answered very well, however, my

data
is more complicated than I originally explained.

Here is my revised problem:

I have one spreadsheet that contains MONTHLY pension payments with

Employee
ID, the Monthly Pay Date and various Pensions details.

In the second spreadsheet I have a column of Employee ID (Note that the
Employee ID can differ only by an alpha character), a second with Pay

Incease
Date and a third column with New Pay Rate; as show below:
Employee Increase Date Pay Rate
764753 24-May-01 9,531.60
764753 24-May-02 10,038.60
764753 23-Jun-02 11,823.24
764753 24-Jun-02 10,038.60
764753 01-Sep-02 10,565.88
764753 22-Sep-02 12,431.64
764753 24-May-03 12,634.44
764753M 15-Sep-01 4,612.14
764753M 09-Jun-02 4,612.14
764753M 15-Sep-02 5,105.62
764753M 09-Dec-02 10,141.30
764761 21-May-01 15,500.00
764761 01-Jun-02 17,000.00
764761 01-Sep-02 17,385.00
764761 01-Sep-03 17,907.00
764761 01-Sep-04 19,000.00
764761 01-Aug-05 24,000.00
764761B 05-Dec-04 9,775.35
764761M 01-May-02 27,000.00
764761M 01-Sep-02 28,000.00

Say I have Employee 764761B with a paydate of 30-Jan-02, I need to find

the
LAST pay increase (the CUREENT rate), in this case 9,775.35.

Thanks in advance your the always excellent help given.

Charles





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
macshimi
 
Posts: n/a
Default Lookup Two Columns - Again

Hi Bob

I have been trying this out and, unfortunately, it only works if there is a
single entry for an employee.

If you look at 764753M there are a number of different pay rates and I need
to find the Employee ID and the rate before the paydate, ie if the emplyee
had an increase in Jun 02 and another in Sep 05 then the pay date in Aug 05
must use the pay rate from Jun 05.

Looking forward to more of your expertise.

Regards

Charles

"Bob Phillips" wrote:

=INDEX(C1:C21,MATCH(MAX(IF(A1:A21="764761B",B1:B21 )),B1:B21,0))

as an array formula, so commit with Ctrl-Shift-Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"macshimi" wrote in message
...
I recently posted a question that Vito answered very well, however, my

data
is more complicated than I originally explained.

Here is my revised problem:

I have one spreadsheet that contains MONTHLY pension payments with

Employee
ID, the Monthly Pay Date and various Pensions details.

In the second spreadsheet I have a column of Employee ID (Note that the
Employee ID can differ only by an alpha character), a second with Pay

Incease
Date and a third column with New Pay Rate; as show below:
Employee Increase Date Pay Rate
764753 24-May-01 9,531.60
764753 24-May-02 10,038.60
764753 23-Jun-02 11,823.24
764753 24-Jun-02 10,038.60
764753 01-Sep-02 10,565.88
764753 22-Sep-02 12,431.64
764753 24-May-03 12,634.44
764753M 15-Sep-01 4,612.14
764753M 09-Jun-02 4,612.14
764753M 15-Sep-02 5,105.62
764753M 09-Dec-02 10,141.30
764761 21-May-01 15,500.00
764761 01-Jun-02 17,000.00
764761 01-Sep-02 17,385.00
764761 01-Sep-03 17,907.00
764761 01-Sep-04 19,000.00
764761 01-Aug-05 24,000.00
764761B 05-Dec-04 9,775.35
764761M 01-May-02 27,000.00
764761M 01-Sep-02 28,000.00

Say I have Employee 764761B with a paydate of 30-Jan-02, I need to find

the
LAST pay increase (the CUREENT rate), in this case 9,775.35.

Thanks in advance your the always excellent help given.

Charles





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Lookup Two Columns - Again

Put the date that you want to test against in E1 (Can simply be =TODAY() if
you want), and use

=INDEX($C$1:$C$21,MATCH(MAX(IF(($A$1:$A$21="764753 M")*($B$1:$B$21<E1),$B$1:$
B$21)),$B$1:$B$21,0))

still an array formula

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"macshimi" wrote in message
...
I recently posted a question that Vito answered very well, however, my

data
is more complicated than I originally explained.

Here is my revised problem:

I have one spreadsheet that contains MONTHLY pension payments with

Employee
ID, the Monthly Pay Date and various Pensions details.

In the second spreadsheet I have a column of Employee ID (Note that the
Employee ID can differ only by an alpha character), a second with Pay

Incease
Date and a third column with New Pay Rate; as show below:
Employee Increase Date Pay Rate
764753 24-May-01 9,531.60
764753 24-May-02 10,038.60
764753 23-Jun-02 11,823.24
764753 24-Jun-02 10,038.60
764753 01-Sep-02 10,565.88
764753 22-Sep-02 12,431.64
764753 24-May-03 12,634.44
764753M 15-Sep-01 4,612.14
764753M 09-Jun-02 4,612.14
764753M 15-Sep-02 5,105.62
764753M 09-Dec-02 10,141.30
764761 21-May-01 15,500.00
764761 01-Jun-02 17,000.00
764761 01-Sep-02 17,385.00
764761 01-Sep-03 17,907.00
764761 01-Sep-04 19,000.00
764761 01-Aug-05 24,000.00
764761B 05-Dec-04 9,775.35
764761M 01-May-02 27,000.00
764761M 01-Sep-02 28,000.00

Say I have Employee 764761B with a paydate of 30-Jan-02, I need to find

the
LAST pay increase (the CUREENT rate), in this case 9,775.35.

Thanks in advance your the always excellent help given.

Charles






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
macshimi
 
Posts: n/a
Default Lookup Two Columns - Again

Thanks Bob

This looks like it works now that I have explained myself properly!

"Bob Phillips" wrote:

Put the date that you want to test against in E1 (Can simply be =TODAY() if
you want), and use

=INDEX($C$1:$C$21,MATCH(MAX(IF(($A$1:$A$21="764753 M")*($B$1:$B$21<E1),$B$1:$
B$21)),$B$1:$B$21,0))

still an array formula

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"macshimi" wrote in message
...
I recently posted a question that Vito answered very well, however, my

data
is more complicated than I originally explained.

Here is my revised problem:

I have one spreadsheet that contains MONTHLY pension payments with

Employee
ID, the Monthly Pay Date and various Pensions details.

In the second spreadsheet I have a column of Employee ID (Note that the
Employee ID can differ only by an alpha character), a second with Pay

Incease
Date and a third column with New Pay Rate; as show below:
Employee Increase Date Pay Rate
764753 24-May-01 9,531.60
764753 24-May-02 10,038.60
764753 23-Jun-02 11,823.24
764753 24-Jun-02 10,038.60
764753 01-Sep-02 10,565.88
764753 22-Sep-02 12,431.64
764753 24-May-03 12,634.44
764753M 15-Sep-01 4,612.14
764753M 09-Jun-02 4,612.14
764753M 15-Sep-02 5,105.62
764753M 09-Dec-02 10,141.30
764761 21-May-01 15,500.00
764761 01-Jun-02 17,000.00
764761 01-Sep-02 17,385.00
764761 01-Sep-03 17,907.00
764761 01-Sep-04 19,000.00
764761 01-Aug-05 24,000.00
764761B 05-Dec-04 9,775.35
764761M 01-May-02 27,000.00
764761M 01-Sep-02 28,000.00

Say I have Employee 764761B with a paydate of 30-Jan-02, I need to find

the
LAST pay increase (the CUREENT rate), in this case 9,775.35.

Thanks in advance your the always excellent help given.

Charles





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
Arithmetical Mode of Criteria in Multiple Non-Adjacent columns Sam via OfficeKB.com Excel Worksheet Functions 4 July 14th 05 09:15 PM
Hidden Columns in Shared Workbooks Rotary Excel Discussion (Misc queries) 1 July 9th 05 12:28 AM
Lookup function skipping columns LaurenLa Excel Worksheet Functions 1 June 30th 05 05:55 PM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


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

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

About Us

"It's about Microsoft Excel"