#1   Report Post  
Posted to microsoft.public.excel.setup
leo leo is offline
external usenet poster
 
Posts: 74
Default Matching Columns

Need assistance,
I have 2 sheets in same workbook. I need to compare Column A in sheet 1 to
Column A in sheet 2 (Col A sheet1 contains a short list of data, Col A sheet2
contains longer list of data). Sheet 2 has data in Column B that matches to
Column A. If Column A sheet 1 data matches Column A sheet 2 data, I need to
display Column B sheet 2 data in Column B sheet 1.
What formula would I use?

  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 35,218
Default Matching Columns

=vlookup(a1,sheet2!a:b,2,false)
will return an error if there is no match or the value in column B of the first
match in sheet2. If column B of the first match is empty, then you'll see a 0.

You can hide the error and the 0 with a formula like:
=if(isna(vlookup(a1,sheet2!a:b,2,false)),"Missing" ,
if(vlookup(a1,sheet2!a:b,2,false)="","",
vlookup(a1,sheet2!a:b,2,false)))

(Change "missing" to whatever you like--including "")

Leo wrote:

Need assistance,
I have 2 sheets in same workbook. I need to compare Column A in sheet 1 to
Column A in sheet 2 (Col A sheet1 contains a short list of data, Col A sheet2
contains longer list of data). Sheet 2 has data in Column B that matches to
Column A. If Column A sheet 1 data matches Column A sheet 2 data, I need to
display Column B sheet 2 data in Column B sheet 1.
What formula would I use?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 184
Default Matching Columns

now i am sure this is simple but if i had 4 sheets and i wanted to disply the
data from column a if it showed up on more them one tab how would i do that.

"Dave Peterson" wrote:

=vlookup(a1,sheet2!a:b,2,false)
will return an error if there is no match or the value in column B of the first
match in sheet2. If column B of the first match is empty, then you'll see a 0.

You can hide the error and the 0 with a formula like:
=if(isna(vlookup(a1,sheet2!a:b,2,false)),"Missing" ,
if(vlookup(a1,sheet2!a:b,2,false)="","",
vlookup(a1,sheet2!a:b,2,false)))

(Change "missing" to whatever you like--including "")

Leo wrote:

Need assistance,
I have 2 sheets in same workbook. I need to compare Column A in sheet 1 to
Column A in sheet 2 (Col A sheet1 contains a short list of data, Col A sheet2
contains longer list of data). Sheet 2 has data in Column B that matches to
Column A. If Column A sheet 1 data matches Column A sheet 2 data, I need to
display Column B sheet 2 data in Column B sheet 1.
What formula would I use?


--

Dave Peterson

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
matching columns Peter[_7_] Excel Worksheet Functions 1 November 18th 07 08:19 PM
Matching 2 columns JJ44 Excel Worksheet Functions 3 July 19th 07 05:24 PM
matching on columns nick Excel Discussion (Misc queries) 0 October 24th 06 05:02 PM
MATCHING COLUMNS JOE Excel Discussion (Misc queries) 0 May 3rd 06 05:51 PM
Matching multiple columns Rothman Excel Worksheet Functions 5 April 13th 06 12:39 PM


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