ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   What type of formula should I use? (https://www.excelbanter.com/excel-discussion-misc-queries/212405-what-type-formula-should-i-use.html)

Dave

What type of formula should I use?
 
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).

I have been messing with Vlookups and have had no luck. I'm thinking I
might need a nested if formula???

Any help would be awesome.

Cheers,

What type of formula should I use?
 
Hi,

=VLOOKUP(A1,Sheet2!B1:D1000,2,FALSE)

where A1 is the product code, and on sheet2 the product codes are in column
B and the info you want back is in column C. Since B is 1, C is 2 here.
False means you want an exact match only.

If this helps, please click the Yes button

Cheers,
Shane Devenshire

"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).

I have been messing with Vlookups and have had no luck. I'm thinking I
might need a nested if formula???

Any help would be awesome.


Sean Timmons

What type of formula should I use?
 
A VLOOKUP would work..

So, if you are on Sheet1 and the data is on sheet2...

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.

"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).

I have been messing with Vlookups and have had no luck. I'm thinking I
might need a nested if formula???

Any help would be awesome.



All times are GMT +1. The time now is 02:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com