macro for comparing fields in two work books


I have two excel spread sheets (say A1 & A2). A1- is the master sprea
sheet and A2 is smaller spread sheet with very few details.

Suppose Column B in A2 has 100 partnumbers and Column C in A1 has th
superset of partumbers (1000) and corresponding details for each par
number, I need to:

1. Check if all the 100 part numbers in A2 has a corresponding match i
2. Extract the info for the matched partnumbers from A1 and list in 
seprate sheet.
3. Even if there in no match A1, let's say for 40 of them, it shoul
still list those parts in the new sheet.

Can anybody help me with this problem. I would really appreciate i
anybody can suggest any tips.



Sunny's Profile:
View this thread:

9/30/2004 5:13:28 PM
excel 39879 articles. 2 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 45

Chip Pearson has lots of techniques at:

(and you may want to use sheet names like Sheet1 and sheet2 (or book1 and
book2).  A1 and A2 look a lot like addresses of ranges.  It's not too confusing
in this example, but it can get confusing pretty quickly.)

Sunny wrote:
> Hello,
> I have two excel spread sheets (say A1 & A2). A1- is the master spread
> sheet and A2 is smaller spread sheet with very few details.
> Suppose Column B in A2 has 100 partnumbers and Column C in A1 has the
> superset of partumbers (1000) and corresponding details for each part
> number, I need to:
> 1. Check if all the 100 part numbers in A2 has a corresponding match in
> A1
> 2. Extract the info for the matched partnumbers from A1 and list in a
> seprate sheet.
> 3. Even if there in no match A1, let's say for 40 of them, it should
> still list those parts in the new sheet.
> Can anybody help me with this problem. I would really appreciate if
> anybody can suggest any tips.
> Thanks
> Sunny
> --
> Sunny
> ------------------------------------------------------------------------
> Sunny's Profile:
> View this thread:


Dave Peterson
ec35720 (10082)
9/30/2004 7:43:24 PM

Similar Artilces:

How to get TASK_ID field for summary tasks without using Project.a
I know for tasks which are not summary tasks we can get TASK_ID field using statusing web service. But i could nto find any other options than Project web service to get TASK_ID field for summary tasks and the top level project task. Problem of using Project web service is that in my custom sharedpoint web part where we are using PSI web services we get all the data required using Resource and Statusing web service for the logged in resource. But Statusing web service retrieves TASK_ID only for actual tasks and not for summary tasks. Now just to get TASK_ID of summary tas...

stack fault error when browsing address book
I have a problem that occurs when browsing the address book "Contacts" that results in the error message: OUTLOOK has caused a stack fault in MSPST32.DLL and the termination of Outlook I've updated the Win98Se and the Office 2000, tried the steps in the KB218853, and searched the newsgroup and KB to no avail. Also tried the Inbox repair tool (scanpst.exe) which found only minor problems and repaired them. I can look at the entire "Contacts" folder in Outlook without problems. This does not appear to be related to any contact record. Thanks Steve ...

when i save a file that i have worked on, excel7 closes down work.
i have recently purchased office pro 2007. Excel 2007, when i save a filethat i have worked on, excel closes down and work is lost, done all updates, re installed from disc, please help i have lost 2 hours of work this moring that i need for a report a few questions: 1. what happens with save as? 2. what happens in safe mode? (hold shift key while starting excel) 3. do you have add-ins? 4. what operating system? x64? -- Gary Keramidas Excel 2003 "rob" <> wrote in message news:0483F09B-3289-42B4-8849-0C0A61380B11@mic...

Can't get the proper display of a field in my report.
I have 2 tables, both using autonumbers for their primary key. The first table is for contacts (i.e. last name, first name, etc.). The second table is for businesses (business name, etc.) I have a field in my contacts table that has a number format so it can be used as a foreign key for the business table. I then set up the relationship between them & enforced referential integrity. When I run a query, I see the name of the business (after setting up a combo box) - no problem. When I run a report based on that query, a number is displayed (not the business name). Suggestions, pleas...

Macros at POS
How far can you take the macro feature? If for example i want to discount an item by a set amount or by a percentage for customers who have a voucher, could i set up a macro which would find and discount an item in a transaction? or is this asking too much? Yes, that's too much for a macro. You can do it with a COM add-in ,or have it done or look into an existing discount or promotion add-in. Macros can only emulate keystrokes or mouse clicks - there is no way to include IF..THEN logic. Glenn Adams Tiber Creek Consulting ---------...

Transferring Field from Existing Table/limitations and change of d
Thank you in advance for your help! I have two Excel spreadsheets that I successfully imported into Access 2003 and created tables for. I need to add the field from one table to the other, but there is not a direct match in the relationship. The large table uses the Employee ID as the primary key. The smaller table contains one field that lists a subset of these Employee ID numbers (a selection of certain employees). I need to transfer this field to the larger table, but I do not know how to tell Access to match up the corresponding numbers (i.e., the large table lists all employees, bu...

How do I TRIM a field in existing fields....?
I didn't realize when I imported some data into my database that there were a bunch of spaces after all the data. I know that I can do a RTRIM the data in a query, but I don't want to have to remember every time I create a query to TRIM it. Do I have to use a query and make a temp table and then delete the data from my original table and then put the data back in from my temp table. I can do this, but wanted to know if there is a better way. Thanks Kelvin Kelvin A standard approach to importing (and "cleaning") data is to import/append to a temporary table, then ...

Query cross two table
Hi, I have two tables, tbAdmission and tbCode. In my tbAdmission, I have Code1, Code2 and Code3. In my tbCode, I have Code, Description1 and Description2. In my Form, frmAdmission, I have txtCode1, txtCode2 and txtCode3 that are all bounded to tbAdmission. And txtDescription1Code1, txtDescription2Code1, txtDescription1Code2, txtDescription2Code2, txtDescription1Code3 and txtDescription2Code3 that are unbounded and only for displaying the descriptions. txtCode1, txtCode2 and txtCode3 all refer to Code in tbCode to retrieve Description1 and Description2 for displaying in the unbou...

AFX_MANAGE_STATE() macro disturbs the startup position of the ATL dialog
Hi All, I have a MFC dialog based application and a COM component developed using ATL with MFC support. The COM component exposes an interface ISum that has a method called Add(). The Add() method displays an ATL dialog that accepts numbers from the user on which addition is to be performed and displays the result as well. The contents of the Add() method are as given below: STDMETHODIMP CSum::Add() { CAcceptInput dlg; dlg.DoModal(); return S_OK; } On click of one of its buttons, the MFC dialog application, instantiates the COM component and invokes the ISu...

Line Graph with two different data points
Hello, I am trying to create a line chart with numbers from my product Vs a competitor. The problem i am having is how can i make a chart that will have four data points comparing to each other? For example Product A- 1.5 1.2 1.6 1.8 Product B- 2.0 1.1 1.2 1.3 Product A- 70% 20 % 30% 67% Product B- 65% 30% 65% 55% How do i get all of these numbers on one chart? Is a line chart correct. I want to see these numbers compared?? Thank you so much Hi, Since the number don't appear related to the percentages you might plot them on the same chart but two different axes. If they were relate...

report prefiltering does not work for custom entity
Please help. I've been trying for days but can't get the reports prefiltering to work for my custom entity. I created a simple report with the CRMAF_ prefix and deploy to the CRM server. The report works fine and display all data OK. Except the pre filter does not work i.e. the "Edit Filter" button does not show. My question is: Does report prefiltering works for custom entity? I saw a lot of posts regarding this topic and tried all the suggestions i could find, but still no luck. I tried the microsoft tutorial in creating a prefilterable report base on the account...

Contact list not recognized as an address book in outlook email
I installed Outlook 2007 on my computer and imported my addresses from my other computer's Outlook file with excel. The contact list shows all the addresses but I can not access the contact list when I try to send an email. The address book drop down menu does not show anything. I tried to do the "properties" on the contact file, selected the tab "Outlook Address Book" and I am not allowed to check the box to "Show this folder as an address book". I am hoping someone can help me get this resolved. Thank you in advance If you have Contacts in...

How do I export, then import my address book(contacts)
I want to share my Outlook 2003 contacts and groups with my husband's Outlook 2003 I would like to export my contacts and groups to his computer. Then I would like for him to be able to merge my contacts and groups with his already existing contacts and groups. How can I accomplish this? I have a friend who wants to do the same with Outlook 2002? Would the procedure be the same for both versions? Please give steps, I am not very computer literate. Thank you so much. Export your Contacts folder in PST format via File | Import and Export | Export to a file ... Then, copy them ...

how to compare 2 values in a report (Invoice Total vs Payments)
while running a report how would I set a message "out of balance" if my invoice amount (Table 1 ) does not equal the value of my total payments (table 2). If the values were the same then no message would be printed. Thank You Create a new command button to check the report before you print it. You will have to enter code for the button along the lines of: If [Invoice Total] <> [Payments] Then MsgBox "This account is out of balance" Endif "Rita" wrote: > while running a report how would I set a message "out of balance" if > my invo...

run Microsoft Publisher 2002 macro in command line
This might look simple but I cannot figure it out. How can you run a Microsoft Publisher 2002 macro in command line? (like in Word, you can do winword file.doc /mNAMEOFTHEMACRO ) In a command line I am not sure. Try posting at microsoft.public.publisher.programming Brian Kvalheim Microsoft Publisher MVP >-----Original Message----- >This might look simple but I cannot figure it out. > >How can you run a Microsoft Publisher 2002 macro in command line? >(like in Word, you can do winword file.doc /mNAMEOFTHEMACRO ) >. > ...

Auto Filter not working
I have a strange problem which occurs from time to time whereby I am unable to activate the Auto Filter function on a list. The filter buttons simply do not appear! Does anybody have any idea why this might happen?? Thanks, Chris J Is the worksheet protected? -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC "Chris Jenkins" <> wrote in message news:bf9p58$app$ > I have a strange problem which occurs from time to time whereby I am unable > t...

Report repeats a field
Example: John Smith 2,14 5,27 3,18 John Smith 3,17 4,27 7,34 John Smith 1,22 6,57 8,92 I want that the report shows a name(John Smith) only one time like this: John Smith 2,14 5,27 3,18 3,17 4,27 7,34 1,22 6,57 8,92 The report get the informations from a Query that get the information from a table. One way to do this would be to set the "name" control's Hide Duplicates property to Yes. Another way to do this would be to use Sorting & Grouping, then Gro...

Linked Table Manager Doesn't Work in Access 2003
I recently upgraded to Access 2003 and have found that the menu option: Tools/Database Utilities/Linked Table Manager no longer works correctly for re-linking my front end database to the backend. No tables show in the table list. If I click “Select All” and then fill in the path to the backend database I get the following error message: Method ‘List’ of object ‘IfieldListWnd’ failed. As a work around I have to delete all the table links from the front-end and then File/Get External Data/Link Tables. Is anybody else having this problem? Thanks in advance for your help. "...

Populating work sheet combox with another work sheet values
Hi All, I have a combox in my sheet(1) which i want to populate with values present in sheet(2). I can populate combox in sheet(1) by setting the "ListFillrange"property to the required ranges in the sheet(1) (assume in coulmn A i have values from A1: A5) But i am unable to populate same combox with sheet(2) values(assume in sheet(2) C column i have set of values from C1: C10). I want to populate without using any macros. Can anyone Please help me to solve this problem Thanks in advance -- sjayar ------------------------------------------------------------------------ sj...

conditional formatting not working in every cell
I have a worksheet that has conditional formatting set for an grade that is below 95 to turn red. The total worksheet has 160 entries and the formatting works on most of the cells except 4 vells show a grade of 95 and its in red. There are several other cells that are at 95 and are not red. I did a paste special across the worksheet, I have also tried to change the cell itself and I still get the same problem. Any way to fix this? Is it possible that your CF refers to the cell above or below the actua cell? i.e conditional formatting in B2 looks in B1 or B3 Something to look into. Re...

gridlines from excel not working?
im trying to make outlook print gridlines. i copy a piece of an excel worksheet into an outlook email. the gridlines appear ok. but when i go to print- they dont appear on the preview or the print out. what do i need to do to make them visible? ------------------------------------------------ ~~ Message posted from ~~View and post usenet messages directly from also when i paste the same clipboard contents into wordpad and select print preview, the gridlines work! the only way i can figure how to get the gridlines to work in outlook is t...

Select Working TV Signal
Hey peeps, I've been looking for an answer to this problem for a couple weeks, done lots of google searches and searched around these forums to see if my question had already been answered.. as far as I can see it has not been. If it has, please point me to a link. thanks. PROBLEM Can not get Media Center TV Setup (win7) to see STB signal. The STB itself is a Scientific America with 1xCoaxial in, and 1xCoaxial out. *NO* RCA/COMPOSITE/HDMI. It is connected to the computer from the Coaxial out to the antenna in on my Hauppauge PVR-150 It asks me if I have a set-top box. ...

Sync Money 2004 with TWO iPaqs?
My wife and I just upgraded (?) from the Palm world to HP iPAQ 5555s. On our Palms we were BOTH able to carry a copy of our Money 2003 checkbook around and keep them synchronized to the desktop Money database using a great product from Ultrasoft. That system allowed two Palms to be using money and stay synced to the desktop. Just a normal hotsync was all that it took to update changes to the Money software. Now that we're in the world of Pocket PCs, I've found that Microsoft doesn't have support for syncing to more than one Pocket PC with it's conduit. We upgraded to Mone...

Money 2005 Standard edition, upgrade to deluxe did not work
I purchased Money 2005 standard edition and then downloaded the upgrade to deluxe online. It didn't upgrade, and I can't redownload the upgrade since it was a one time download. I've tried calling support but hung up after an hour. Please help! kyoung The trial version may still appear in the About Microsoft Money topic on the Help menu after you upgrade to Money 2005 Deluxe:;en-us;889930 The main points are: Make sure you are signing into Money with the same Passport you used to purchase the upgrade, AND reboot your computer....

How do I convert a two-part, black logo into two separate colors..
I have created a flyer/mailer for my small business. My company's logo are the two block letters 'C' (gold) and 'G' (Blue). I have the graphic saved in my clip arts. Up to now, I can only convert both letters to either all gold or all navy, but not two the two separate colors on the same page. Can anyone help! ReBell in Ms Hey Rebell, From what I've discovered (if the logo isn't too complicated), highlight your 'placed' logo, go to the 'Arrange' tab at the top of the screen and 'Ungroup' the logo. Once it's ungrouped, you shou...