ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   LookUp (https://www.excelbanter.com/excel-worksheet-functions/188361-lookup.html)

CherylH

LookUp
 
Hi all,
I am attempting to pull in a field value into my worksheet and am having
difficulty - I am using lookup but can't seem to figure this out!
=========================================
I have 2 worksheets:

--Worksheet 1 contains:
Column A = Data Field Names

--Worksheet 2 contains
Column A = Data Field Names
Column B = <blank or 'P1'

I want to "lookup" the Data Field Name on Worksheet 2, and if it has a
status code of "P1" in column B, I want that status to go into Column B on
Worksheet 1 on the same row of the Data Field Name:

example:
Worksheet 1 have the following:

Data_Field_1
Data_Field_2

Worksheet 2 has the following:
Column A Column B
Data_Field_1 P1 ***want this value to appear in
worksheet 1
Data_Field_2





Spiky

LookUp
 
On May 21, 8:54 am, CherylH wrote:
Hi all,
I am attempting to pull in a field value into my worksheet and am having
difficulty - I am using lookup but can't seem to figure this out!
=========================================
I have 2 worksheets:

--Worksheet 1 contains:
Column A = Data Field Names

--Worksheet 2 contains
Column A = Data Field Names
Column B = <blank or 'P1'

I want to "lookup" the Data Field Name on Worksheet 2, and if it has a
status code of "P1" in column B, I want that status to go into Column B on
Worksheet 1 on the same row of the Data Field Name:

example:
Worksheet 1 have the following:

Data_Field_1
Data_Field_2

Worksheet 2 has the following:
Column A Column B
Data_Field_1 P1 ***want this value to appear in
worksheet 1
Data_Field_2


I find LOOKUP strange, the newer functions are easier. On Worksheet 1,
cell B4:
=VLOOKUP(A4,Worksheet 2!$A$1:$B$100,2,FALSE)

Something like that should work. Your column A must not have typos
when comparing Worksheet 1 to Worksheet 2.


All times are GMT +1. The time now is 12:47 PM.

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