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 5th, 2002, 08:27 PM   #1
TiggerToo
Board Regular
 
Join Date: Feb 2002
Location: Macon, Georgia USA
Posts: 124
Default

I have this formula:
=if(or(c6=11,c6=0),"",vlookup(c6,dutycode!a4:a15,4,))

My problem is when a number is not on the lookup list I get a #N/A in the same cell as the formula (F6).
sheet 01 cell c6 is where I input a code,
sheet(dutycode) is where vlookup searches for the correct codes to enter in CELL F6.
I do not know what to do?
this is what is also needed;
if c6>=39
if c6<=410
if c6>=412
if c6<=610
if c6>=612,"")
The codes that need to have a response to in cell F6 are 11,12,26,27,29,31,32,38,411,611
that is why I want everything else to show a blank.
Thank you,
Walter
TiggerToo is offline   Reply With Quote
Old Mar 5th, 2002, 08:39 PM   #2
IML
MrExcel MVP
 
Join Date: Feb 2002
Location: Denver, CO
Posts: 1,744
Default

Quote:
On 2002-03-05 19:27, TiggerToo wrote:
I have this formula:
=if(or(c6=11,c6=0),"",vlookup(c6,dutycode!a4:a15,4,))

My problem is when a number is not on the lookup list I get a #N/A in the same cell as the formula (F6).
sheet 01 cell c6 is where I input a code,
sheet(dutycode) is where vlookup searches for the correct codes to enter in CELL F6.
I do not know what to do?
this is what is also needed;
if c6>=39
if c6<=410
if c6>=412
if c6<=610
if c6>=612,"")
The codes that need to have a response to in cell F6 are 11,12,26,27,29,31,32,38,411,611
that is why I want everything else to show a blank.
Thank you,
Walter
I think
=IF(COUNTIF(dutycode!$A$1:$A$10,C6),VLOOKUP(C6,dutycode!$A$1:$D$10,4,0),"")

would do the trick, assuming your range is A1:D10 on you dutycode page. the countif range should be the left most column of your range.


__________________
Give $3 to Mr Excel's Holiday Charity Event!
Write Up
http://www.mrexcel.com/board/viewtop...0916&forum=9&4
Dontate
http://www.mrexcel.com/sunshop/index...bstart=0&id=18
IML is offline   Reply With Quote
Old Mar 6th, 2002, 12:11 AM   #3
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-03-05 19:27, TiggerToo wrote:
I have this formula:
=if(or(c6=11,c6=0),"",vlookup(c6,dutycode!a4:a15,4,))

My problem is when a number is not on the lookup list I get a #N/A in the same cell as the formula (F6).
sheet 01 cell c6 is where I input a code,
sheet(dutycode) is where vlookup searches for the correct codes to enter in CELL F6.
I do not know what to do?
this is what is also needed;
if c6>=39
if c6<=410
if c6>=412
if c6<=610
if c6>=612,"")
The codes that need to have a response to in cell F6 are 11,12,26,27,29,31,32,38,411,611
that is why I want everything else to show a blank.
Thank you,
Walter
Walter,

The formula that IML suggests in response to your current thread has been already given to you in the previous thread.

Apparently, such a formula doesn't fit your needs. That's surprising.

Care to post the lookup table that you're trying to use?

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Mar 6th, 2002, 08:50 AM   #4
TiggerToo
Board Regular
 
Join Date: Feb 2002
Location: Macon, Georgia USA
Posts: 124
Default

Here is the lookup table I am using.
column A Column B Column C
DUTY CODES SHRED CODES EXPLANATION
11 Direct Labor (REG) Blank space
411 Over Time OT
611 Compensate CT
12 Direct TDY
26 30 Shop Clean-up SHPC
27 1 Training TRNG
29 Union Activities UNIN
31 Annual Leave AL
32 Sick Leave SL
33 44 Holiday HOL
38 Compensatory Leave CTL
What I explained earlier, I would like for
a blank to appear whenever a number that
is not on the lookup table is entered in
column

Below is a small sample of my excel sheet that I use for time. This is the way

col a col b col c col d
date code hrs type code

______________________________
M 3-1-02 | 27 | 3 | TRNG
M 3-1-02 | 11 | 3 | (REG)Work is Blank
M 3-1-02 | 31 | 2 | AL
T 3-2-02 | 11 | 8 |
W 3-3-02 | 11 | 2 |
w 3-3-02 | 27 | 2 |Inserted extra line
W 3-3-02 | 32 | 4 | SL

NOW For Part 2!!!

I also need a formula to total each day's hours, not to exceed 8 hrs, unless OT code is in col B.
My other problem is on the summary sheet, I have 14 columns, by 26 rows (PayPeriods), One column for each day of the payperiod. The only times that go on this summary sheet are ANNUAL LEAVE, SICK LEAVE or HOLIDAY. I do not know how to write a formula to look at more than one line if the same date goes on more than one line.
If a line is inserted in the above form, Annual Leave will move over one day later which I do not want to happen)or it will not appear at all.
# PayPeriod.....S.M.T.W.T.F.S/S.M.T.W.T.F.S
06 Mar 24 Apr 06....3.4
07 Apr 07 Apr 20....
08 Apr 21 May 04
09 May 05 May 18
10 May 19 Jun 01

HELP,

Thanks
Walter

[ This Message was edited by: TiggerToo on 2002-03-07 02:39 ]

[ This Message was edited by: TiggerToo on 2002-03-08 18:24 ]
TiggerToo 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 04:12 PM.


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