About Bill Hermanson Expertise Please tell me WHICH EXCEL VERSION you are using!
DO NOT ASK ME me about Macros or VBA.
Please read my "instructions to questioners" in my full profile [use View Profile, at right], to help you write a question that I can understand, without having to ask you what you mean.
If your question contains any of the words THIS, IT, THAT, THOSE, or THEY, I likely won't understand IT. Please rewrite!
My Expertise: I am an expert at data manipulation, the use of incredibly complex logical statements, databases, combining tables and extracting data, all the LOGICAL, LOOKUP & REFERENCE functions, dynamic ranges, creating professional appearing spreadsheets, complex functions, integrated charts and visual displays, user interfaces.... I can make Excel do anything!
But PLEASE... NO MACRO or VBA QUESTIONS!
Experience 25 years development of complex spreadsheets for personal and professional use. I've developed hundreds (or thousands!) of spreadsheets in all fields, from complex engineering calculations to game scoring, financial analysis, scheduling, cost-of-doing-business, and analysis of home energy use. I even used Excel to assist in design of the flight computers presently on board the Hubble Space Telescope (1984-1991)
Education/Credentials BSEE Electrical Engineering, CU Boulder CO USA Use of spreadsheets since 1982 Boulder Valley School District, Life Long Learning, Instructor Owner & Operator of Excel Expert, LLC
I have two worksheets (ABLE and BETA) and would like to search for duplicate data in colume A in both worksheets. If there is a match, copy data in worksheet ABLE row E to worksheet BETA row E. Also if it finds more than one of the same duplicates create a new row and copy the data from worksheet ABLE row A and E to BETA row A and E.
Thanks for help.
Answer Ariano,
Your problem statement is a bit confusing because you repeatedly refer to ROW E when you probably mean COLUMN E. There is no such thing as ROW E.
So you have two workbooks, ABLE & BETA. You want to look for MATCHING (not 'duplicate') data in column A between these two workbooks. If there is an entry in BETA col A that has a matching entry in ABLE, col A, you want to retrieve the info from Able Col E from the row that has the matching entry in col A. Correct?
If so, what you need is equations in BETA, and NONE in ABLE. BETA will interrogate ABLE and draw information from ABLE. So you need a series of VLOOKUP statements, in BETA, one for every entry in Col A in BETA. Each lookup will interrogate the entire col A in ABLE, and then retrieve an item that is 5 rows to the right.
The question of how to handle more-than-one occurrence of any entry in Bate's COL A occurring in ABLE's col A is much trickier. VLOOKUP doesn't like duplicates! For each entry in Beta's col A, you could do a COUNTIF of ABLE'S col A. If you get more than 1, you know there is a duplicate.... but what to do about it is another question.
I suggest a series of MATCH statements be applied to ABLE's Col A, and the results of these be disregarded (by means of an IF statement) if the COUNTIF for the corresponding value in BETA's col A returns a count of 1 or zero for ABLE's col A. If the COUNTIF is > 1, then use the FIRST match to find the row in ABLE in which the first occurrence is. Then feed this result to a second MATCH that will look BELOW that row in ABLE's col A for the next occurrence. Once you know what row the next occurrence is, an INDEX can be used (by feeding in the 2nd row number) to retrieve the corresponding value from ABLE's col E.
You'll have to place a series of INDEX functions BELOW to table in BETA in order for their results to show up in the correct place.
You could use the MATCH technique for the entire job, which might make it simpler than using a combo of VLOOKUP & MATCH.
If you create an INDEX and double (or triple!!!) MATCH setup for each entry in BETA's COL A, most of the MATCH & INDEX functions will return errors, so you'll need to embed them within IF statements that check for errors using ISERROR, and then which evaluate to zero, a blank cell, or some other value that is innocuous to you.
In any case, this is somewhat complex and will take significant work to get it right. Keep trying because it IS possible.
I hope my guidelines are sufficient to get you started.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here