Solved

lookup

Posted on 2011-02-24
9
302 Views
Last Modified: 2012-05-11
I have two worksheets

One called data1 with the following columns
ID
WBS ID

Second is called data1 with the following columns
ID
WBS <---- empty needs to be filled from data 1 via lookup
0
Comment
Question by:Matt Pinkston
  • 5
  • 3
9 Comments
 
LVL 50

Expert Comment

by:barry houdini
ID: 34975292
It's a little difficult to work out your setup from that description....

If data1 has WBS in column A and IDs in column B then in the other sheet, if A2 has an ID use this formula in B2

=INDEX(Data!A:A,MATCH(A2,Data!B:B,0))

regards, barry
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34975325
sorry, I meant the sheet name to be data1 not data......and I should also include some error handling so formula should be

=IFERROR(INDEX(data1!A:A,MATCH(A2,data1!B:B,0)),"No match")

see attached

regards, barry
26846411.xlsx
0
 
LVL 6

Expert Comment

by:TinTombStone
ID: 34975411
Or a VLookup perhaps

this in B2
=VLOOKUP(A2,data1!$A$2:$B$5,2,FALSE)
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34975430
I wasn't sure which way round the columns were TinTombStone. A standard VLOOKUP won't be possible if the data to be returned is in a column to the left of the data to be matched.....whereas INDEX/MATCH can work either way round....

regards, barry
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Matt Pinkston
ID: 34975444
let me be more specific

first worksheet (codes)
column E has ID
column B has WBS

second worksheet (Monthly)
column B has ID
coulmn E needs WBS from codes on match of IDs
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 34975491
Then you need INDEX/MATCH as suggested, try this in E2 on Monthly sheet

=IFERROR(INDEX(codes!B:B,MATCH(B2,codes!E:E,0)),"No match")

then copy formula down column

regards, barry
0
 

Author Comment

by:Matt Pinkston
ID: 34975676
works perfetc but it throughs the results in between two cells which is kindof weird
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 34975711
I think that sometimes happens when you copy formulas from directly from here, it affects the formatting, you might have to change the font and/or "left justify" the data....

regards, barry
0
 

Author Closing Comment

by:Matt Pinkston
ID: 34976190
perfect!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now