Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Compare cells in different worksheets

I have a need to compare column A in a sheet1 to A in sheet2 and if equal
move the value of Column B in sheet2 to Column B in Sheet 1. I have read the
vlookup, index, match examples but I am unable to get it to work. Below is
some sample data.

Any help would be appreciated.

Sheet1 Column A Cells 1 thru 11
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
III
JJJ
KKK

Sheet2 Column A Cells 1 thru 11 Sheet2 Column B Cells 1 thru 11
AAA 1
BBB 2
111 3
222 4
EEE 5
FFF 6
555 7
666 8
JJJ 9
444 10
KKK 11

The result should be (Sheet1)
Column A Col B
AAA 1
BBB 2
CCC
DDD
EEE 5
FFF 6
GGG
HHH
III
JJJ 9
KKK 11

--
Mike
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Compare cells in different worksheets

Try this in B1 of Sheet1
=VLOOKUP(A1,Sheet2!A:B,2,False)
and copy down

This will give you the values from Col B of Sheet2 where Col A matches with
A1 and #N/A where it does not. To suppress the #N/A use this
=IF(ISNA(VLOOKUP(A1,Sheet2!A:B,2,False)),"",VLOOKU P(A1,Sheet2!A:B,2,False))

"Mike" wrote:

I have a need to compare column A in a sheet1 to A in sheet2 and if equal
move the value of Column B in sheet2 to Column B in Sheet 1. I have read the
vlookup, index, match examples but I am unable to get it to work. Below is
some sample data.

Any help would be appreciated.

Sheet1 Column A Cells 1 thru 11
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
III
JJJ
KKK

Sheet2 Column A Cells 1 thru 11 Sheet2 Column B Cells 1 thru 11
AAA 1
BBB 2
111 3
222 4
EEE 5
FFF 6
555 7
666 8
JJJ 9
444 10
KKK 11

The result should be (Sheet1)
Column A Col B
AAA 1
BBB 2
CCC
DDD
EEE 5
FFF 6
GGG
HHH
III
JJJ 9
KKK 11

--
Mike

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Compare cells in different worksheets

Sheeloo,

Thanks, your solution worked great. I had a similar one but for some reason
it did not work, I will need to compare the two.

Thanks again for the help.
--
Mike


"Sheeloo" wrote:

Try this in B1 of Sheet1
=VLOOKUP(A1,Sheet2!A:B,2,False)
and copy down

This will give you the values from Col B of Sheet2 where Col A matches with
A1 and #N/A where it does not. To suppress the #N/A use this
=IF(ISNA(VLOOKUP(A1,Sheet2!A:B,2,False)),"",VLOOKU P(A1,Sheet2!A:B,2,False))

"Mike" wrote:

I have a need to compare column A in a sheet1 to A in sheet2 and if equal
move the value of Column B in sheet2 to Column B in Sheet 1. I have read the
vlookup, index, match examples but I am unable to get it to work. Below is
some sample data.

Any help would be appreciated.

Sheet1 Column A Cells 1 thru 11
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
III
JJJ
KKK

Sheet2 Column A Cells 1 thru 11 Sheet2 Column B Cells 1 thru 11
AAA 1
BBB 2
111 3
222 4
EEE 5
FFF 6
555 7
666 8
JJJ 9
444 10
KKK 11

The result should be (Sheet1)
Column A Col B
AAA 1
BBB 2
CCC
DDD
EEE 5
FFF 6
GGG
HHH
III
JJJ 9
KKK 11

--
Mike

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,805
Default Compare cells in different worksheets

You are most welcome.

I am happy that it worked out for you.

-Sheeloo
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
Need to compare 2 worksheets... Bonnie Excel Discussion (Misc queries) 3 December 2nd 08 11:06 AM
compare 2 worksheets for simliar cells and then comb into one work [email protected] Excel Discussion (Misc queries) 1 January 29th 08 01:18 AM
compare worksheets klafert Excel Discussion (Misc queries) 6 January 15th 07 02:17 AM
How do I compare cells and if FALSE compare to next cell in EXCEL Cindie Excel Worksheet Functions 0 March 24th 06 05:29 PM
How do I compare data in two worksheets to find matching cells? Gary Excel Discussion (Misc queries) 4 March 2nd 06 09:04 PM


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