Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default lookup over several columns

I'm trying to have a lookup over several columns

situation
sheet 1
A B C
56 110 50000
56 120 10000
56 130 5000
57 110 30000
57 120 10000
57 130 5000

sheet 2
A B C D
56 110 0000
56 110 0001
56 120 0000
56 120 0001

I need value C from sheet 1 put into column D in sheet 2 no matter wath the value is in column C of sheet 2

How do I do this (exact file is 25000 lines so copy/paste isn't a real option)


Submitted via EggHeadCafe - Software Developer Portal of Choice
C# Specification Compiled CHM Help File
http://www.eggheadcafe.com/tutorials...-compiled.aspx
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 563
Default lookup over several columns

Two ideas:
A) VLOOKUP
On Sheet1 make a new A column
In A1 use =B1&C1 and copy down the column by double clicking A1's fill
handle
In D1 of Sheet 2 enter =VLOOKUP(A1&B1,Sheet1!$A$1:$D$2000,4,FALSE)
Copy down the column

B) INDEX & MATCH
In row 1 of some column to the right (I will use K) =A1&B1
Copy down the column by dragging
In D1 of Sheet2 enter
=INDEX(Sheet1!C1:C2000,MATCH(A1&B1,Sheet1!$K$1:$K$ 2000,0))
Copy down the column

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
"Sander Nagtegaal" wrote in message ...
I'm trying to have a lookup over several columns

situation
sheet 1
A B C
56 110 50000
56 120 10000
56 130 5000
57 110 30000
57 120 10000
57 130 5000

sheet 2
A B C D
56 110 0000
56 110 0001
56 120 0000
56 120 0001

I need value C from sheet 1 put into column D in sheet 2 no matter wath
the value is in column C of sheet 2

How do I do this (exact file is 25000 lines so copy/paste isn't a real
option)


Submitted via EggHeadCafe - Software Developer Portal of Choice
C# Specification Compiled CHM Help File
http://www.eggheadcafe.com/tutorials...-compiled.aspx


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Thanks

Thank you very much for the quick reply



Bernard Liengme wrote:

Two ideas:A) VLOOKUPOn Sheet1 make a new A columnIn A1 use =B1&C1 and copy
07-Jan-10

Two ideas:
A) VLOOKUP
On Sheet1 make a new A column
In A1 use =B1&C1 and copy down the column by double clicking A1's fill
handle
In D1 of Sheet 2 enter =VLOOKUP(A1&B1,Sheet1!$A$1:$D$2000,4,FALSE)
Copy down the column

B) INDEX & MATCH
In row 1 of some column to the right (I will use K) =A1&B1
Copy down the column by dragging
In D1 of Sheet2 enter
=INDEX(Sheet1!C1:C2000,MATCH(A1&B1,Sheet1!$K$1:$K$ 2000,0))
Copy down the column

best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Build a Google Search VS.Net IDE Macro
http://www.eggheadcafe.com/tutorials...search-vs.aspx
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
lookup 2 columns [email protected] Excel Worksheet Functions 1 January 3rd 08 06:37 AM
Lookup across columns MarkN Excel Worksheet Functions 3 October 18th 06 11:59 PM
Lookup Two Columns - Again macshimi Excel Worksheet Functions 5 January 10th 06 02:44 PM
Lookup Two Columns macshimi Excel Worksheet Functions 5 January 4th 06 07:44 PM
Lookup a value using two columns liz217 Excel Worksheet Functions 3 November 1st 05 07:58 PM


All times are GMT +1. The time now is 06:52 AM.

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"