Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,388
Default Vlookup: giving me REF# problems. Help

Here is what I would like a formula to do???

I have two workbooks- I will place the formula only in one and extract
data/info. from the other.

What I want the formula to do is...
I want it to search through a column of product codes from the other
workbook (numbers, e.g. 21, 22) and when the desired code (let's say 21) is
detected. I want it to return the information (text info) from a different
column (I.E. transaction description) but the same row as the desired result
(21).

HERE IS WHAT I HAVE BEEN TOLD AND HAVE DONE BUT DOES NOT WORK...
What I get back is a reference error (REF)...Why is this occuring? What can
I do to try to fix it?
If I change the column I want back the only one that gives me anything is 1.
And it just returns 21??


Your product code is in column A of both and your text to return is in
column B of Sheet2, then in Sheet1, type:

=VLOOKUP(A2,Sheet2!A:B,2,0)

This will return the value in sheet2, column A that matches the value in A2
of Sheet1 and return the matching value from column B.

If your product is in column B and text is in A, it will not work. you must
start with the lookup value and return a value to the right of it.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Vlookup: giving me REF# problems. Help

The second parameter in the VLOOKUP function defines the table where
you want to find matching data - this might be something like:

Sheet1!A$2:F$10

In this case, the table is 6 columns wide (A to F), and so the next
parameter could be anything from 1 to 6, as this determines which
column the data should be brought from when a match is found.

I suspect that your table has just been defined as a single column
table (eg A1:A100), and so you will only be able to return data from
column 1 - other values will give rise to the #REF error.

Hope this helps.

Pete

On Dec 4, 6:26*pm, Dave wrote:
Here is what I would like a formula to do???

I have two workbooks- *I will place the formula only in one and extract
*data/info. from the other.

What I want the formula to do is...
I want it to search through a column of product codes from the other
workbook (numbers, e.g. 21, 22) and when the desired code (let's say 21) is
detected. *I want it to return the information (text info) from a different
column (I.E. transaction description) but the same row as the desired result
(21).

HERE IS WHAT I HAVE BEEN TOLD AND HAVE DONE BUT DOES NOT WORK...
What I get back is a reference error (REF)...Why is this occuring? *What can
I do to try to fix it? *
If I change the column I want back the only one that gives me anything is 1.
*And it just returns 21??

Your product code is in column A of both and your text to return is in



column B of Sheet2, then in Sheet1, type:


=VLOOKUP(A2,Sheet2!A:B,2,0)


This will return the value in sheet2, column A that matches the value in A2
of Sheet1 and return the matching value from column B.


If your product is in column B and text is in A, it will not work. you must
start with the lookup value and return a value to the right of it.- Hide quoted text -


- Show quoted text -


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Vlookup: giving me REF# problems. Help

hI,

If your working in 2 workbooks then the reference to the lookup range must
include the workbook name

=VLOOKUP(A2,[Book2]Sheet2!$A:$B,2,0)

If it's different worksheets in the same workbook then this does it

=VLOOKUP(A2,'Sheet 2'!A:B,2,0)

Mike


"Dave" wrote:

Here is what I would like a formula to do???

I have two workbooks- I will place the formula only in one and extract
data/info. from the other.

What I want the formula to do is...
I want it to search through a column of product codes from the other
workbook (numbers, e.g. 21, 22) and when the desired code (let's say 21) is
detected. I want it to return the information (text info) from a different
column (I.E. transaction description) but the same row as the desired result
(21).

HERE IS WHAT I HAVE BEEN TOLD AND HAVE DONE BUT DOES NOT WORK...
What I get back is a reference error (REF)...Why is this occuring? What can
I do to try to fix it?
If I change the column I want back the only one that gives me anything is 1.
And it just returns 21??


Your product code is in column A of both and your text to return is in
column B of Sheet2, then in Sheet1, type:

=VLOOKUP(A2,Sheet2!A:B,2,0)

This will return the value in sheet2, column A that matches the value in A2
of Sheet1 and return the matching value from column B.

If your product is in column B and text is in A, it will not work. you must
start with the lookup value and return a value to the right of it.


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
Vlookup command not giving the correct result VKL Narayanan[_2_] Excel Worksheet Functions 2 November 1st 08 11:48 AM
vlookup not giving correct output houghi Excel Discussion (Misc queries) 3 July 3rd 08 05:28 PM
vlookup not giving correct output Tom Hutchins Excel Discussion (Misc queries) 1 July 3rd 08 03:21 PM
Vlookup giving #N/A matt_the_brum Excel Worksheet Functions 12 August 4th 06 09:17 AM
VLookup in VBA giving error message ayl322 Excel Discussion (Misc queries) 3 July 27th 05 06:06 PM


All times are GMT +1. The time now is 04:35 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"