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 15th, 2002, 05:19 PM   #1
Acody
New Member
 
Join Date: Mar 2002
Posts: 4
Default

I am using the VLOOKUP Formula to add numbers together (from two different tables)only if their job number matches. If the job numbers do not match I want my cell to read the total from my second table. How can I do this?
Thanks,
Annie
Acody is offline   Reply With Quote
Old Mar 15th, 2002, 05:24 PM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-03-15 16:19, Acody wrote:
I am using the VLOOKUP Formula to add numbers together (from two different tables)only if their job number matches. If the job numbers do not match I want my cell to read the total from my second table. How can I do this?
Thanks,
Annie
Can you post the VLOOKUP formula that you use along with where the job numbers are to be found?

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Mar 15th, 2002, 05:35 PM   #3
Acody
New Member
 
Join Date: Mar 2002
Posts: 4
Default

=SUM(K31+VLOOKUP(B31,jobnumber,10,FALSE))

1st Table: (3 Job #s)
B14:B16

2nd Table: (3 Job 3s)-only one same # as first table
B30:B32

Thanks!
Acody is offline   Reply With Quote
Old Mar 15th, 2002, 09:31 PM   #4
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

=if(b31=VLOOKUP(B31,jobnumber,1,FALSE),SUM(K31+VLOOKUP(B31,jobnumber,10,FALSE)),"Not Equal")

I think...
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Old Mar 16th, 2002, 02:01 AM   #5
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-03-15 16:35, Acody wrote:
=SUM(K31+VLOOKUP(B31,jobnumber,10,FALSE))

1st Table: (3 Job #s)
B14:B16

2nd Table: (3 Job 3s)-only one same # as first table
B30:B32

Thanks!
Annie,

I'm still confused.

'jobnumber' seems to be a lookup table. What range is it? And how B14:B16 and B30:B32 are related to 'jubnumber'?

Does K31 hold a value that is computed by a VLOOKUP formula?

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Mar 19th, 2002, 09:31 AM   #6
Acody
New Member
 
Join Date: Mar 2002
Posts: 4
Default

Aladin, Thanks for your continued help : )

The range for "jobnumber" is:
B9 to K9
B16 to K16
(everything in the square above).

B14:B16 are the job numbers from week one that I have on my timesheet.
B30:B32 are the job numbers from my second week, and on the second week I added one new job that I did not work on the first week.
So when I plug in my formula for the new job my cell reads N/A...b/c my formula wants to pull a number from week #1.
I want my formula to look to week one for a similiar job number, if it does not find one, then add only the hours worked on that job for week two.
K31 it a sum of the hours I worked on that job for week two. K31 is the cell I want my formula to refer to if week one does not have the same job number as week two.

Sorry that this is so confusing! : )
Acody is offline   Reply With Quote
Old Mar 19th, 2002, 01:03 PM   #7
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-03-19 08:31, Acody wrote:
Aladin, Thanks for your continued help : )

The range for "jobnumber" is:
B9 to K9
B16 to K16
(everything in the square above).

B14:B16 are the job numbers from week one that I have on my timesheet.
B30:B32 are the job numbers from my second week, and on the second week I added one new job that I did not work on the first week.
So when I plug in my formula for the new job my cell reads N/A...b/c my formula wants to pull a number from week #1.
I want my formula to look to week one for a similiar job number, if it does not find one, then add only the hours worked on that job for week two.
K31 it a sum of the hours I worked on that job for week two. K31 is the cell I want my formula to refer to if week one does not have the same job number as week two.

Sorry that this is so confusing! : )
It's indeed hard to describe the organization of one's worksheet. I don't think I could have done better. After seeing your worksheet, I can now say what you need:

In L30 enter:

=K30+IF(COUNTIF($B$9:$B$16,B30),VLOOKUP(B30,$B$9:$K$16,10,0),0)

and copy down this as far as needed.

$B$9:$K$16 is the range which you named 'jobnumber'. I think there isn't much of a reason to use a named range here, but you want to, replace that range by its name.

Aladin

Aladin Akyurek is offline   Reply With Quote
Old Mar 19th, 2002, 01:19 PM   #8
Acody
New Member
 
Join Date: Mar 2002
Posts: 4
Default

Thank you so much!!!!
It finally worked!!!
Yippee, yahoo.
I am soooo happy!
Acody 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 06:51 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