![]() |
Query, copy & paste
Hey there, I'm trying to extract key data from a spreadsheet in this way: the spreadsheet has cells in different columns which may have matching data. I want Excel to find these matching cells and copy the rows in which they reside onto a second sheet. For example: The first column in question is a listing of Service Orders. I want Excel to search the second column in question, Purchase Orders, for a match. When a match or matches are found I want any row containing that info to be presented on the second spreadsheet. The example is probably redundant, but hopefully stating it slightly differently will help illuminate my goal. Thanks in advance, Nate -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 |
Query, copy & paste
Life is usually much simpler if you keep your data in one location.
I'd just use one worksheet, but then apply Data|Filter|Autofilter to see the rows I want to see. But if you really, really want... Debra Dalgleish and Ron de Bruin have samples that you may like. Ron's addin may be sufficient right out of the box. Debra's site: http://www.contextures.com/excelfiles.html Create New Sheets from Filtered List -- uses an Advanced Filter to create separate sheet of orders for each sales rep visible in a filtered list; macro automates the filter. AdvFilterRepFiltered.xls 35 kb or Update Sheets from Master -- uses an Advanced Filter to send data from Master sheet to individual worksheets -- replaces old data with current. AdvFilterCity.xls 55 kb And Ron de Bruin's easyfilter. http://www.rondebruin.nl/easyfilter.htm ThalesNate wrote: Hey there, I'm trying to extract key data from a spreadsheet in this way: the spreadsheet has cells in different columns which may have matching data. I want Excel to find these matching cells and copy the rows in which they reside onto a second sheet. For example: The first column in question is a listing of Service Orders. I want Excel to search the second column in question, Purchase Orders, for a match. When a match or matches are found I want any row containing that info to be presented on the second spreadsheet. The example is probably redundant, but hopefully stating it slightly differently will help illuminate my goal. Thanks in advance, Nate -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 -- Dave Peterson |
Query, copy & paste
Dave, I don't think a filter will work because I'm trying to compare data from separate columns. I did take a peek at Debra's link but there's a lot of data there and it's hard to discern what pertains to me. Ron's link was down at the time, but I'll check it later. I'm including a pic this time to better illustrate my needs, I want Excel to find any data in the "Customer PO" column beginning with a "20" and search the "Order Number" column to find the match. Can filtering do this? Thanks for your feedback, Nate +-------------------------------------------------------------------+ |Filename: ExcelExample.GIF | |Download: http://www.excelforum.com/attachment.php?postid=4293 | +-------------------------------------------------------------------+ -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 |
Query, copy & paste
Since I connect the newsgroups directly, I can't see the picture.
You'll usually get more responses if you post in plain text--lots of people skip by posts with attachments (pictures or excel files). ThalesNate wrote: Dave, I don't think a filter will work because I'm trying to compare data from separate columns. I did take a peek at Debra's link but there's a lot of data there and it's hard to discern what pertains to me. Ron's link was down at the time, but I'll check it later. I'm including a pic this time to better illustrate my needs, I want Excel to find any data in the "Customer PO" column beginning with a "20" and search the "Order Number" column to find the match. Can filtering do this? Thanks for your feedback, Nate +-------------------------------------------------------------------+ |Filename: ExcelExample.GIF | |Download: http://www.excelforum.com/attachment.php?postid=4293 | +-------------------------------------------------------------------+ -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 -- Dave Peterson |
Query, copy & paste
Thanks for the tip... Basically, the details are thus: _*Service_Order___:_______Purchase_Order__*_ -*2016500 <---| -*SO-56137 2016501 | 20273896054 2016502 -* |--- 2016500- * I need Excel to associate the first and third lines by associating cells that share neither a common row nor column, can filtering do that? Thanks (again) Nate -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 |
Query, copy & paste
Not easily and depending on your data--maybe not at all.
Is there anyway you can put the common stuff in a dedicated column--and on each row? ThalesNate wrote: Thanks for the tip... Basically, the details are thus: _*Service_Order___:_______Purchase_Order__*_ -*2016500 <---| -*SO-56137 2016501 | 20273896054 2016502 -* |--- 2016500- * I need Excel to associate the first and third lines by associating cells that share neither a common row nor column, can filtering do that? Thanks (again) Nate -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 -- Dave Peterson |
Query, copy & paste
Well...there's a lot of each data and most items don't match, that's why I thought query would be the best route initially, like maybe a do-loop using VBA. -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 |
Query, copy & paste
So if column B contains a po--any po in column A, then copy that single row to a
different location??? You could insert a new column (C?) and use: =isnumber(match(b1,a:a,0)) And drag down. Then filter to show just the trues and copy those rows. But I'm not sure how that matches up with what you want. You may want to try explaining it once more. ThalesNate wrote: Well...there's a lot of each data and most items don't match, that's why I thought query would be the best route initially, like maybe a do-loop using VBA. -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 -- Dave Peterson |
Query, copy & paste
Dave, That's doing something, which is a start. It's flaky, though, when I re-sort I have to re-drag so it will reference the correct cell because it likes to shift down a cell. Hard to explain. Anyway, I'll monkey with it in my free time tomorrow, hopefully I can get it to make sense. I appreciate you taking the time to make me some code, though. Regards, Nate -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 |
Query, copy & paste
Dave, I used your code to isolate the data I need. Good stuff! Now it comes down to re-organizing the pertinent data... -- ThalesNate ------------------------------------------------------------------------ ThalesNate's Profile: http://www.excelforum.com/member.php...o&userid=31037 View this thread: http://www.excelforum.com/showthread...hreadid=507028 |
All times are GMT +1. The time now is 07:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com