Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Compare values in 2 ranges

In a spreadsheet from cell D4 to D23 i have customer numbers, they are ranked
1 to 20 for sales in 2005. the rankings 1 to 20 are in column C range c4 to
c23 In cell I4 toI23 same thing except it is 2004 sales. They are ranked 1
to 20 which are in column H range H4 to h23

What I am trying to to is compare the customer number in column D and look
in Column I, when it finds a match then I want to look in the rankings column
H and put that value in Column B next to the same customer number.

The end result is I would be able to see where they were in 2004 against 2005
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default Compare values in 2 ranges

Hi Nigel,

If I read your post correctly the formula below will work in Column C.

=INDEX($H$4:$H$23,MATCH(D4,$I$4:$I$23,0),1)

Enter this formula into Cell C4 and then copy it down to Cell C23. The
formula is setup with the following in mind:

Column D (D4:D23) = Customer Numbers
Column E (E4:E23) = 2005 Ranking
Column H (H4:H23) = 2004 Ranking
Column I (I4:I23) = Customer Numbers
Column C - the column that performs lookup for 2004 rank of Column D
Customer Number.

Hope that helps.

Regards,
James
"Nigel" wrote:

In a spreadsheet from cell D4 to D23 i have customer numbers, they are ranked
1 to 20 for sales in 2005. the rankings 1 to 20 are in column C range c4 to
c23 In cell I4 toI23 same thing except it is 2004 sales. They are ranked 1
to 20 which are in column H range H4 to h23

What I am trying to to is compare the customer number in column D and look
in Column I, when it finds a match then I want to look in the rankings column
H and put that value in Column B next to the same customer number.

The end result is I would be able to see where they were in 2004 against 2005

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default Compare values in 2 ranges

Absolutely PERFECT

Thanks

"JS2004R6" wrote:

Hi Nigel,

If I read your post correctly the formula below will work in Column C.

=INDEX($H$4:$H$23,MATCH(D4,$I$4:$I$23,0),1)

Enter this formula into Cell C4 and then copy it down to Cell C23. The
formula is setup with the following in mind:

Column D (D4:D23) = Customer Numbers
Column E (E4:E23) = 2005 Ranking
Column H (H4:H23) = 2004 Ranking
Column I (I4:I23) = Customer Numbers
Column C - the column that performs lookup for 2004 rank of Column D
Customer Number.

Hope that helps.

Regards,
James
"Nigel" wrote:

In a spreadsheet from cell D4 to D23 i have customer numbers, they are ranked
1 to 20 for sales in 2005. the rankings 1 to 20 are in column C range c4 to
c23 In cell I4 toI23 same thing except it is 2004 sales. They are ranked 1
to 20 which are in column H range H4 to h23

What I am trying to to is compare the customer number in column D and look
in Column I, when it finds a match then I want to look in the rankings column
H and put that value in Column B next to the same customer number.

The end result is I would be able to see where they were in 2004 against 2005

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
compare two or more ranges tywlam Excel Worksheet Functions 3 April 23rd 09 10:18 AM
Compare ranges tywlam Excel Worksheet Functions 0 April 23rd 09 04:07 AM
compare values in 2 ranges Martin Wheeler Excel Programming 10 March 22nd 05 10:14 PM
Compare ranges Johnnyb Excel Programming 0 August 11th 04 02:30 PM
compare ranges in different workbooks and copy "not matching values" at bottom of range 1 Kaza Sriram Excel Programming 1 August 6th 04 07:47 PM


All times are GMT +1. The time now is 09:27 AM.

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"