MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 29th, 2002, 11:07 AM   #1
Ed Namzug
New Member
 
Join Date: Mar 2002
Location: Los Angeles, CA
Posts: 9
Default

Please help in creating a 3rd worksheet which is the result of comparing 1st and 2nd worksheet.
The Sheet 1 has all the original info and consists of columns A & B. The Sheet 2 has new info and also has columns A & B. I would like the macro or program to first look at Sheet 2, compare/delete the data that matches in Sheet 1, list the data that matches only one column then, create
Sheet 3 with the new data. In another way it's like, Sheet 1 - Sheet 2 = Sheet 3
Thanks in advance...
Ed Namzug is offline   Reply With Quote
Old Mar 29th, 2002, 11:51 AM   #2
HERMIT
New Member
 
Join Date: Mar 2002
Posts: 2
Default

You could just do that formula you quoted in sheet 3, by clicking A1 of sheet 1, then put minus, then click A1 of sheet2 and then copy it into columns A and B of sheets 3. Then perhaps filter column A and B, or sort, to find the ones which have a difference not = 0 or whatever you wanna do.

However, when I did this once, excel kept on crashing as it couldn't handle copying so many formulas.


Hermit.

[ This Message was edited by: HERMIT on 2002-03-29 10:53 ]
HERMIT is offline   Reply With Quote
Old Mar 29th, 2002, 11:56 AM   #3
Dave Patton
Board Regular
 
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
Default


With my commentary that follows,
example sheets are named 1 and 2 and
if there is a match the result is 1.

in C1 enter
=SUMPRODUCT(('1'!$A$1:$A$8='2'!A1)*('1'!$B$1:$B$8='2'!B1))

Copy or FillDn the formula for the length of the data.

Filter or sort on Column C.
Delete if you want the data C >= 1

Copy the balance of the information if necessary (or desired) to another sheet.

Perhaps someone else will give you a compreshensive macro.

How much of the macro have you prepared?
Dave Patton is offline   Reply With Quote
Old Mar 29th, 2002, 03:31 PM   #4
Ed Namzug
New Member
 
Join Date: Mar 2002
Location: Los Angeles, CA
Posts: 9
Default

Thanks Dave & Hermit for the prompt reply..
I am sorry if I wasn't clear the first time..
Allow me to express my problem in another way, please..
Sheet 1 is a list of outstanding checks (Col A=check number, Col B=check amount).
Sheet 2 is a list of checks that was cleared by the Bank (Col A=check number, Col B=check amount).
My goal is to automate the process of deleting the checks and amounts that are the same in both sheets (1 & 2) and create a 3rd sheet with just the outstanding checks and amounts.
I do not know how to create a Macro, being a little over average Excel user.
Please help...
Thanks in advance and You All have a Happy Easter..!!!
Ed Namzug is offline   Reply With Quote
Old Mar 29th, 2002, 04:04 PM   #5
Dave Patton
Board Regular
 
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
Default


The Sumproduct formula will work for your purpose.

Set it up on one sheet to determine which items are still outstanding and on the other to determine which have not yet been recorded.

Copy the unrecorded items to the main sheet
and extend the sumproduct formulas.

The amounts that have 0 as a result of the Sumproduct formula are still outstanding.

You can do a sumif on the amount column considering cleared 1 or uncleared 0.


Filter the information on the 0 and you will have a list of outstanding cheques.

A while ago I created a very complex array to do the above. This approach is much cleaner.

I will prepare a ss for you if you want a sample.
Dave Patton is offline   Reply With Quote
Old Mar 29th, 2002, 04:22 PM   #6
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-03-29 14:31, Ed Namzug wrote:
Thanks Dave & Hermit for the prompt reply..
I am sorry if I wasn't clear the first time..
Allow me to express my problem in another way, please..
Sheet 1 is a list of outstanding checks (Col A=check number, Col B=check amount).
Sheet 2 is a list of checks that was cleared by the Bank (Col A=check number, Col B=check amount).
My goal is to automate the process of deleting the checks and amounts that are the same in both sheets (1 & 2) and create a 3rd sheet with just the outstanding checks and amounts.
I do not know how to create a Macro, being a little over average Excel user.
Please help...
Thanks in advance and You All have a Happy Easter..!!!
Hi Ed Namzug:
I am reproducing sample data for three worksheets per your specification:

ChecksRecd
chkno amount
1 300
2 525
3 30
4 5000
5 30
6 450
7 30
8 900
9 600

ChecksCleared
chkno amount
1 300
2 525
3 30
4 5000
5 30
7 30

ChecksOutstanding
chkno amount
1 0
2 0
3 0
4 0
5 0
6 450
7 0
8 900
9 600
using the formula:
=Sheet1!B3-IF(ISERROR(VLOOKUP(A3,Sheet2!A:B,2,FALSE)),0,VLOOKUP(A3,Sheet2!A:B,2,FALSE))

Then I can filter the sheet ChecksOutstanding with Custom criterion ... AMOUNT>0

The filtered list looks like:
ChecksOutstanding
chkno amount
6 450
8 900
9 600

HTH

Please post back if it works for you ... otherwise explain a little further and let us take it from there!



__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old Mar 29th, 2002, 04:31 PM   #7
Dave Patton
Board Regular
 
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
Default


The OP wants to check both cheque number and amount. One could use Vlookup but to work properly the two columns on both sheets would have to be concatenated.

If numbers could be like 11 and 1, a separator character say "|" could be used.
- A2&"|"&B2.
Dave Patton is offline   Reply With Quote
Old Mar 29th, 2002, 05:12 PM   #8
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,452
Default

Quote:
On 2002-03-29 15:31, Dave Patton wrote:

The OP wants to check both cheque number and amount. One could use Vlookup but to work properly the two columns on both sheets would have to be concatenated.

If numbers could be like 11 and 1, a separator character say "|" could be used.
- A2&"|"&B2.
Hi DavePatton:
This is how I looked at it --
there is one Worksheet ChkRecd that has checkNumbers and amounts;
then there is another Worksheet ChksCleared that has checkNumbers and amounts
The third Worksheet ChksOutstanding starts off with all the checkNumbers that are in the first Worksheet, and then populates the outstanding amounts by looking up and subtracting the amounts in the first and second worksheets
then the last step is to filter extract only the outstanding checks.
__________________
Regards!

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
www.energyefficientbuild.com
Yogi Anand is offline   Reply With Quote
Old Mar 29th, 2002, 05:31 PM   #9
Ed Namzug
New Member
 
Join Date: Mar 2002
Location: Los Angeles, CA
Posts: 9
Default

Yogi,
You've hit the jackpot.!!! That's exactly my thoughts.., Man..!
One Q, please... Where do I type the formula.? On Sheet3 Cell B3? How can I automate it?
I am sorry... Just want to clarify..
All of you Fellas are really awesome and great.!!!
THANK YOU VERY MUCH.!!!
Ed Namzug is offline   Reply With Quote
Old Mar 29th, 2002, 06:00 PM   #10
Dave Patton
Board Regular
 
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
Default

Use an extra sheet if you want.
The more the merrier and the more complex.

The formula that I presented covered ref#, Dr. and Cr. on the GL Sheet and on the Bank Sheet.

Bank Summary numbers update automatically with just a few total formulas.

Ensure that you match ref# and amount both directions.

Extending the formula, filtering the data, and moving to Summary requires a 10 line sub.

"Once stretched by a new idea, man's mind never returns to its original dimensions.
- Oliver Wendell Holmes "


[ This Message was edited by: Dave Patton on 2002-03-30 08:17 ]
Dave Patton is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 08:30 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes