#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
WT WT is offline
external usenet poster
 
Posts: 16
Default If statement

Probably just late in the evening but am trying to capture an adjacent column
to a unique identifier from another worksheet and populate in the original
worksheet. The first worksheet may have duplicate entries but all rows would
need to bring back information e.g.

Worksheet 1 :
Column A
12345
12345
15432
14325
Worksheet 2 :
Column A Column B
12345 Bananas
12432 Apples
15325 Pears

Worksheet 1 after add function :
12345 Bananas
12345 Bananas
12432 Apples
15325 Pears

Anything simple would be good although in the future likely to be pulling
back several cells of information adjacent and unique to the identifier.

Thanks





  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default If statement

Try this:

=VLOOKUP(A1,Sheet2!A$1:B$100,2,0)

Copy down as needed

--
Biff
Microsoft Excel MVP


"WT" wrote in message
...
Probably just late in the evening but am trying to capture an adjacent
column
to a unique identifier from another worksheet and populate in the original
worksheet. The first worksheet may have duplicate entries but all rows
would
need to bring back information e.g.

Worksheet 1 :
Column A
12345
12345
15432
14325
Worksheet 2 :
Column A Column B
12345 Bananas
12432 Apples
15325 Pears

Worksheet 1 after add function :
12345 Bananas
12345 Bananas
12432 Apples
15325 Pears

Anything simple would be good although in the future likely to be pulling
back several cells of information adjacent and unique to the identifier.

Thanks







  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default If statement

You could try VLOOKUP - as you have not given any ranges for your
data, I've used full-column references:

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

and copy down as required.

If you are likely to have more columns in future, you could try this:

=VLOOKUP($A1,Sheet2!$A:$F,COLUMN(B1),0)

and then you could copy this across (to column F maximum) - the COLUMN
parameter will adjust automatically to give you 2, 3, 4 etc.

Hope this helps.

Pete
On Nov 3, 6:45*pm, WT wrote:
Probably just late in the evening but am trying to capture an adjacent column
to a unique identifier from another worksheet and populate in the original
worksheet. *The first worksheet may have duplicate entries but all rows would
need to bring back information e.g.

Worksheet 1 :
Column A
12345
12345
15432
14325
Worksheet 2 :
Column A Column B
12345 Bananas
12432 Apples
15325 Pears

Worksheet 1 after add function :
12345 Bananas
12345 Bananas
12432 Apples
15325 Pears

Anything simple would be good although in the future likely to be pulling
back several cells of information adjacent and unique to the identifier.

Thanks


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
Sum if statement with a left statement Eric D Excel Discussion (Misc queries) 4 July 23rd 08 05:31 PM
Can an If statement answer an If statement? M.A.Tyler Excel Discussion (Misc queries) 2 June 24th 07 04:14 AM
appending and IF statement to an existing IF statement spence Excel Worksheet Functions 1 February 28th 06 11:00 PM
If statement and Isblank statement Rodney C. Excel Worksheet Functions 0 January 18th 05 08:39 PM
Help please, IF statement/SUMIF statement Brad_A Excel Worksheet Functions 23 January 11th 05 02:24 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"