Solved

lookup

Posted on 2011-02-24
9
304 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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
 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

861 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