Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how do i sort 2 colums so that the same values line up

I've got 2 worksheets with lists of products, the 1st colum on each sheet
contains the productcodes. These lists are not exactly the same, list one is
much longer than the other, but all codes in list 2 are in list 1. I now want
to have 1 list with the data from both worksheets. I want the codes from list
2 to line up on the same row with the matching code from list 1. Both lists
have several colums with additional info about the product and this info has
to move aswell.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default how do i sort 2 colums so that the same values line up

Index n Match is one way to get it done

Assume you want to update Sheet1 (your master)
with data from Sheet2's cols B to D
where the key match col = col A (product codes) in both Sheet1/2

In Sheet1,
You've got existing data in cols A to D,
with key col = col A (product codes)

Place in say, E2:
=IF(ISNA(MATCH($A2,Sheet2!$A:$A,0)),"",INDEX(Sheet 2!B:B,MATCH($A2,Sheet2!$A:$A,0)))
Copy E2 across to G2, fill down to extract data from Sheet2's cols B to D
based on matching with the product codes in col A. Unmatched codes, if any,
will return blanks: "".
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"odi et amo" wrote:
I've got 2 worksheets with lists of products, the 1st colum on each sheet
contains the productcodes. These lists are not exactly the same, list one is
much longer than the other, but all codes in list 2 are in list 1. I now want
to have 1 list with the data from both worksheets. I want the codes from list
2 to line up on the same row with the matching code from list 1. Both lists
have several colums with additional info about the product and this info has
to move as well.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default how do i sort 2 colums so that the same values line up

Please follow following steps
1.Select the cell B1 in your sheet1 and enter following formula
=VLOOKUP(A1,Sheet2!$A$1:$C$4,2,FALSE)
2.Similarly select C1 in sheet1 and enter following formula
=VLOOKUP(A1,Sheet2!$A$1:$C$4,3,FALSE)

Here, Note that the more additional information column are in sheet2, the
more columns in sheet1 should be held with the vlookup formula

Have a nice time€¦.

Chris
------
Convert your Excel spreadsheet into an online calculator.
http://www.spreadsheetconverter.com

--
Message posted via http://www.officekb.com

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
Compare Sheets values in two colums Geir[_2_] Excel Worksheet Functions 1 April 7th 08 01:55 PM
Probably stupid, but I can't get rid of a line between two colums craig-o Excel Discussion (Misc queries) 7 January 20th 06 12:52 PM
Sort rows by colums spartanfans13 New Users to Excel 3 August 1st 05 08:50 PM
Automatically Sort colums tamato43 Excel Discussion (Misc queries) 2 March 20th 05 09:00 AM
Line Column on 2 axes that shows stacked colums Paul Henderson Charts and Charting in Excel 2 February 27th 05 02:22 PM


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

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

About Us

"It's about Microsoft Excel"