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 26th, 2002, 01:36 PM   #1
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Aloha All,

Been handed this project and a continuation from yesterday's question.

Column A and B are scheduled arr/dep time
Column C and D are actual arr/dep times
Column E is aircraft type
I need to count 1 if:
d-c is less than or equal to 30 mins
if c is less than a, and d-c is less than or equal b-a
and if aircraft type is 717 (column e)

I have this formula, but it's the opposite of what I intended.

IF(OR(F6="",G6=""),"",IF((F6-G6)*1440>VLOOKUP(B6,Lookup,3,0),1,0))

Brian from Maui is offline   Reply With Quote
Old Mar 26th, 2002, 01:56 PM   #2
Tom Schreiner
Board Regular
 
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
Default

Hi Brian
Someone will probably give you a good formula to use, if not I'll write you a macro. Am kinda new at the Excel thing.
Learning a lot here though.
Good Luck
Tom
Tom Schreiner is offline   Reply With Quote
Old Mar 26th, 2002, 02:18 PM   #3
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,314
Default

Brian,

> I need to count 1 if:
> StatementA d-c is less than or equal to 30 mins
> StatementB if c is less than a,
> StatementC and d-c is less than or equal b-a
> StatementD and if aircraft type is 717 (column e)

is ambigious:

Must StatementA, StatementB, and StatementC all be TRUE at the same time [AND all]

or

one of these being TRUE is sufficient [OR]?

Please disregard StatementD in answering the preceeding question.

Aladin

[ This Message was edited by: Aladin Akyurek on 2002-03-26 13:18 ]
Aladin Akyurek is offline   Reply With Quote
Old Mar 26th, 2002, 02:27 PM   #4
Dave Patton
Board Regular
 
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
Default


try

=IF(COUNT(A3:E3)=5,AND(D3-C3<=I1,C3
Dave Patton is offline   Reply With Quote
Old Mar 26th, 2002, 02:37 PM   #5
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Aladin,

I knew this was going to be tough to explain

I have a table with aircraft and ground time parameters, hence the vlookup in formula.

If a 717 aircraft has a scheduled ground time of 45 mins (b-a). It arrives late (c>a). It leaves late (d>b). However, it spends >30 mins and <45 mins on the ground (d-c), count as 1.
A 767 aircraft is allowed 45 mins
A DC10 is allowed 75 mins.
I'm getting confused!
Brian from Maui is offline   Reply With Quote
Old Mar 26th, 2002, 02:49 PM   #6
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,314
Default

Quote:
On 2002-03-26 13:37, Brian from Maui wrote:
Aladin,

I knew this was going to be tough to explain

I have a table with aircraft and ground time parameters, hence the vlookup in formula.

If a 717 aircraft has a scheduled ground time of 45 mins (b-a). It arrives late (c>a). It leaves late (d>b). However, it spends >30 mins and <45 mins on the ground (d-c), count as 1.
A 767 aircraft is allowed 45 mins
A DC10 is allowed 75 mins.
I'm getting confused!
Thus, when JSF is scheduled to depart at 06:00 and to arrive/ground at 06:04, and the lookup table says 4 minutes, and when it departs at 12:00 and grounds at 12:02, we count this event as 1. Is that right?

Aladin Akyurek is offline   Reply With Quote
Old Mar 26th, 2002, 02:57 PM   #7
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Here's an example:

A 7:00
B 7:45
C 7:20
D 7:51
Count as 1, because although it's alloted 45(b-a) mins, it exceed 30 mins (d-c) and because it's a 717 aircraft count as 1.

table:
717 31
767 46
D10 75
I have another column between both, hence 3 on the syntax. and a cell to reference what type of aircraft.
Brian from Maui is offline   Reply With Quote
Old Mar 26th, 2002, 03:08 PM   #8
Jack in the UK
Board Regular
 
Join Date: Feb 2002
Posts: 3,064
Default

Hi Brian

Sorry to step in .. Aladins your man can i suggest you ask if poss can you sent Aladin the WkBk if thats at all poss, of cause if Aladin does not mind, not my place to say its ok, must be worth the asking of me thinks:

////


__________________
Free Excel based Web Toolbar available here.

Jack in the UK
J & R Excel Solutions
"making Excel work for you"
Jack in the UK is offline   Reply With Quote
Old Mar 26th, 2002, 04:10 PM   #9
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,314
Default

Quote:
On 2002-03-26 13:57, Brian from Maui wrote:
Here's an example:

A 7:00
B 7:45
C 7:20
D 7:51
Count as 1, because although it's alloted 45(b-a) mins, it exceed 30 mins (d-c) and because it's a 717 aircraft count as 1.

table:
717 31
767 46
D10 75
I have another column between both, hence 3 on the syntax. and a cell to reference what type of aircraft.
I'm trying to get you to formulate the rules when a flight event counts as a hit (that's, 1) for a given aircraft. I'll harass you until a consistent set of rules is settled/negotiated .

Here the list we have so far:

[1] The central object is the elapsed time: that's the time spent between departure and grounding.
[2] We have for each flight event an allotted (scheduled) duration: b-a [that is, the value in B minus the value in A].
[3] We have for each flight event an actual duration: d-c [that is, the value in D minus the value in C].
[4] We have for each flight event the type of the aircraft involved: e [that is, the value in E].
[5] We have a norm table that, for each type of aircraft, shows the allowed duration (the norm) that it needs to take for a flight (apparently for a fixed, single type of traject).

The data area in the relevant worksheet consists of columns A:E where A houses the scheduled departure time, B scheduled arrival/grounding time, C the actual departure time, D the actual arrival/grounding time, and E the type of aircraft.

In F, we want to see a 1 for the aircraft in E, when:

ActualDuration<=AllowedDuration OR
ActualDuration<=AllotedDuration

otherwise 0.

Please read this carefully. Make suggestions/corrections using the terms deined here. If needed, add new terms along with their definitions.

Am I getting close?

Aladin

Aladin Akyurek is offline   Reply With Quote
Old Mar 26th, 2002, 04:28 PM   #10
Brian from Maui
Board Regular
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,743
Default

Quote:
On 2002-03-26 15:10, Aladin Akyurek wrote:
Quote:
On 2002-03-26 13:57, Brian from Maui wrote:
Here's an example:

A 7:00
B 7:45
C 7:20
D 7:51
Count as 1, because although it's alloted 45(b-a) mins, it exceed 30 mins (d-c) and because it's a 717 aircraft count as 1.

table:
717 31
767 46
D10 75
I have another column between both, hence 3 on the syntax. and a cell to reference what type of aircraft.
I'm trying to get you to formulate the rules when a flight event counts as a hit (that's, 1) for a given aircraft. I'll harass you until a consistent set of rules is settled/negotiated .

Here the list we have so far:

[1] The central object is the elapsed time: that's the time spent between departure and grounding.

YES

[2] We have for each flight event an allotted (scheduled) duration: b-a [that is, the value in B minus the value in A].

YES, however, if the flight is late, the allotted time is then deferred to the type of aircraft.

[3] We have for each flight event an actual duration: d-c [that is, the value in D minus the value in C].

YES, again the duration if the flight is late (c>a) the allotted time is then deferred to the type of aircraft.

[4] We have for each flight event the type of the aircraft involved: e [that is, the value in E].

YES

[5] We have a norm table that, for each type of aircraft, shows the allowed duration (the norm) that it needs to take for a flight (apparently for a fixed, single type of traject).

A lookup table when a certain aircraft is entered in a cell

The data area in the relevant worksheet consists of columns A:E where A houses the scheduled departure time, B scheduled arrival/grounding time, C the actual departure time, D the actual arrival/grounding time, and E the type of aircraft.

In F, we want to see a 1 for the aircraft in E, when:

ActualDuration<=AllowedDuration OR
ActualDuration<=AllotedDuration

Actual Duration<=AllowedDuration by aircraft type (717 31 mins, 767, 45 mins) and b-a
Actual duration<=Allotted duration IF C<=A

otherwise 0.

Please read this carefully. Make suggestions/corrections using the terms deined here. If needed, add new terms along with their definitions.

Am I getting close?

YES!

Aladin

Brian from Maui 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 09:07 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