Solved

Vlookup value in different worksheet

Posted on 2013-11-03
12
478 Views
Last Modified: 2013-11-10
I'm a database geek, but my Excel experience is extremely limited and I cannot get the syntax working properly on a VLookUp() function call.  It might have something to do with a space in a worksheet name of the first worksheet.

I have two worksheets in a workbook. The first is titled 'Gas 092013', the other is 'RAD_Gas_0913'.

I have inserted a column (P) into RAD_GAS_0913 and want to pull in the value from column J in 'Gas 092013' where the value in Column B matches column B in 'Rad_Gas_0913'.

I tried:

=IF(ISNA(VLOOKUP(B3,'Gas 092013'!$B:$J,10,FALSE)), "not found", VLOOKUP(B3,'Gas 092013'!$B:$J,10,FALSE))

If it makes a difference, the "data" in 'RAD_Gas_0913' starts on row 2 of the spreadsheet, but in 'Gas 092013', the data starts on row 9 and ends on row 605.
0
Comment
Question by:Dale Fye (Access MVP)
  • 3
  • 3
  • 2
  • +2
12 Comments
 
LVL 49

Expert Comment

by:Rgonzo1971
ID: 39620250
Hi,

Maybe it is because you want the 9th column of the data not the  10th

=IF(ISNA(VLOOKUP(B3,'Gas 092013'!$B:$J,9,FALSE)), "not found", VLOOKUP(B3,'Gas 092013'!$B:$J,9,FALSE))

Open in new window

Regards
0
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 0 total points
ID: 39620270
Nah, that's not it, I already fixed that.

However, I realized that column B on the 'RAD_Gas_0913' is a number formatted as text, and should be a number, which is probably the problem.  So, how do I go about changing that that entire column to numbers, not text?

Using Value(B2) works, but I would prefer to just change that column from text to numeric.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39620290
Try adding a zero by copy-pastespecial-add
0
 
LVL 49

Expert Comment

by:Rgonzo1971
ID: 39620293
one way is to enter in a free cell a 1 and then copy it and use Paste Special Values Operation Multiply

PS
Regards
0
 
LVL 50

Expert Comment

by:barry houdini
ID: 39620305
In Excel 2007 you can use IFERROR function to avoid repeating the VLOOKUP in your formula, i.e.

=IFERROR(VLOOKUP(B3,'Gas 092013'!$B:$J,9,FALSE),"not found")

To convert a text-formatted number column to numbers try using "Text to columns" functionality.

Select your column of data > On Data tab select "Text to columns" > Finish

Now your VLOOKUP should work

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.

 
LVL 32

Assisted Solution

by:Rob Henson
Rob Henson earned 250 total points
ID: 39624015
If you have Error Reporting enabled, the cells with numbers as text will have a green triangle in the top left hand corner. When you click on the cell a drop down will appear to the left which when clicked will show an option to conevrt to number.

If you highlight the whole range and select this on the first selected cell it will convert all of them.

Seems quicker than having to do the Text to Columns or copy and pasting.

Thanks
Rob H
0
 
LVL 47

Author Comment

by:Dale Fye (Access MVP)
ID: 39624119
I've requested that this question be closed as follows:

Accepted answer: 0 points for fyed's comment #a39620270
Assisted answer: 250 points for robhenson's comment #a39624015

for the following reason:

Thanks, Rob.  That was what I was looking for for the conversion.  I had over 500 rows and was trying to figure out how to do it all at once.
0
 
LVL 32

Expert Comment

by:Rob Henson
ID: 39624120
If that was what you were looking for, why close the question? Accept my suuggestion as your solution.
0
 
LVL 47

Author Comment

by:Dale Fye (Access MVP)
ID: 39624299
Well, Rob, my question was about getting the VLOOKUP to work, and I achieved that myself.  I could have just closed the post.  However, your post was helpful for future use, so I awarded you 250 points.
0
 
LVL 32

Expert Comment

by:Rob Henson
ID: 39624413
Apologies, hadn't spotted the split of points. A moderator will have to get involved to reduce the points to be allocated for the solution.

Alternatively, share the 500 points with myself and Barry who also provided a solution on the vlookup issue.

Thanks
Rob H
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

Suggested Solutions

Title # Comments Views Activity
Excel Formula 4 28
ActiveX Listbox Multi Select in Excel 2010 8 19
Help with Excel formula 6 38
Help Updated Qtr 2 11
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

867 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