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 Apr 30th, 2002, 05:46 PM   #1
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

I finally got this to work:

=IF(ISBLANK(D6),"",INDEX(hotelprice,MATCH(D4,hotel,0),MATCH(F2,seasonnumber,0)))

Now, here's what I need.

I need to add that if the value of D6 is greater than 1, I want to add *3* to the value in D4 and THAT's the column I want to return. In other words, D4 currently says 3, because that's the heading I want it to find the value (price of a night's stay) under. Now, have headings 1 through 6. 1 through 3 represent 3 variations (seasons) of the price the 1st night's stay. 4 through 6 represent the same 3 variations of the price of the 2nd night's stay.

I'm going to attempt to post my data momentarily.
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Old Apr 30th, 2002, 05:48 PM   #2
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

Hotel 1 2 3 4 5 6
ABC 55.00 71.25 73.75 15.00 18.75 18.75
BCD 80.00 92.50 98.75 68.75 68.75 81.25
CDE 46.25 61.25 61.25 25.00 27.50 31.25
DEF 55.00 67.50 71.25 25.00 25.00 27.50
EFG 111.25 123.75 130.00 81.25 81.25 87.50
FGH 80.00 92.50 98.75 31.25 33.75 33.75
GHI 65.00 73.75 77.50 50.00 50.00 56.25
HIJ 61.25 77.50 77.50 31.25 33.75 33.75
IJK 67.50 80.00 86.25 37.50 37.50 43.75
JKL 86.25 98.75 105.00 50.00 50.00 56.25
KLM 98.75 111.25 123.75 56.25 56.25 62.50


Praying before I hit submit.
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Old Apr 30th, 2002, 05:53 PM   #3
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Hi,

Would either of these work?

=IF(ISBLANK(D6),"",INDEX(hotelprice,MATCH(IF(D6>1,D4+3,D4),hotel,0),MATCH(F2,seasonnumber,0)))

or

=IF(ISBLANK(D6),"",INDEX(hotelprice,MATCH(D4,hotel,0)+IF(D6>1,3,0),MATCH(F2,seasonnumber,0)))

My guess is the second one, but can't be sure until you post the data.

Bye,
Jay

Since you want to shift the columns, the added IF statements should go to the column area of the INDEX.

Where does your table start? What are the named ranges?


[ This Message was edited by: Jay Petrulis on 2002-04-30 16:56 ]
Jay Petrulis is offline   Reply With Quote
Old Apr 30th, 2002, 05:57 PM   #4
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

Ah!

Feel free to view!

[file removed]

_________________
TheWordExpert

[ This Message was edited by: Dreamboat on 2002-04-30 17:07 ]
Anne Troy is offline   Reply With Quote
Old Apr 30th, 2002, 06:01 PM   #5
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

Jay, if you're at notes.... I'll email the real thing!
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Old Apr 30th, 2002, 06:03 PM   #6
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Hi Dreamboat,

Please send it. I have your table, but the ranges don't make sense to me.

Jay
Jay Petrulis is offline   Reply With Quote
Old Apr 30th, 2002, 06:07 PM   #7
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-04-30 16:48, Dreamboat wrote:
Hotel 1 2 3 4 5 6
ABC 55.00 71.25 73.75 15.00 18.75 18.75
BCD 80.00 92.50 98.75 68.75 68.75 81.25
CDE 46.25 61.25 61.25 25.00 27.50 31.25
DEF 55.00 67.50 71.25 25.00 25.00 27.50
EFG 111.25 123.75 130.00 81.25 81.25 87.50
FGH 80.00 92.50 98.75 31.25 33.75 33.75
GHI 65.00 73.75 77.50 50.00 50.00 56.25
HIJ 61.25 77.50 77.50 31.25 33.75 33.75
IJK 67.50 80.00 86.25 37.50 37.50 43.75
JKL 86.25 98.75 105.00 50.00 50.00 56.25
KLM 98.75 111.25 123.75 56.25 56.25 62.50


Praying before I hit submit.
I understand this kind of Greek I hope , but the real Greek, alas.

What is in F2 -- a seasonnumber?

What is in D4 -- a hotel?

How do you want to indicate whether it's 1 night or 2?

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Apr 30th, 2002, 06:08 PM   #8
Anne Troy
MrExcel MVP
 
Anne Troy's Avatar
 
Join Date: Feb 2002
Location: Allentown, PA
Posts: 2,510
Default

Thanks anyway, Aladin!
Jay P has my file...

You guys are the best!!
__________________
~Anne Troy
Anne Troy is offline   Reply With Quote
Old Apr 30th, 2002, 06:46 PM   #9
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

Hi Aladin,

The range names reference two sheets. The answer Dreamboat needed was the following:

=IF(ISBLANK(D6),"",INDEX(hotelprice,MATCH(D4,hotel,0),MATCH(F2,seasonnumber,0)+IF(D6>1,3,0)))

BTW, you are a machine! It is way past midnight in the Netherlands and you are still here. Is sleep your enemy?

You, on this board, and Peo S. on the other board are amazing.

Bye,
Jay
Jay Petrulis is offline   Reply With Quote
Old Apr 30th, 2002, 06:54 PM   #10
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-04-30 17:46, Jay Petrulis wrote:
Hi Aladin,

The range names reference two sheets. The answer Dreamboat needed was the following:

=IF(ISBLANK(D6),"",INDEX(hotelprice,MATCH(D4,hotel,0),MATCH(F2,seasonnumber,0)+IF(D6>1,3,0)))

BTW, you are a machine! It is way past midnight in the Netherlands and you are still here. Is sleep your enemy?

You, on this board, and Peo S. on the other board are amazing.

Bye,
Jay
Thanks Jay. Rescued. I was going to give Dreamboat more Greek.

I didn't realize it was late.



Aladin
Aladin Akyurek 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:29 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