• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

IF statement

tisa brown

New Member
How do I write the following formula:

37 people are going on a trip

11 single accomdations is 1800.00

13 double accomdations is 2750.00


If the now of people falls below 30 the single accomdations will cost 2950.00 and the double will cost 2250.00


Thank you
 
=if(#of single +# of double >= 30,#of single * 1800 + #of double *2750, #of single * 2950+ #of double *2250)
 
I would rather use :


=if(#of single +# of double*2 >= 30,#of single * 1800 + #of double *2750, #of single * 2950+ #of double *2250)


difference : # of double *2 to count number of people.
 
tisa,

Can you post the formula you used? both Fred and GCExcel's formula used text to indicate where cell references needed to go.


Also, to clarify, is it "11 single accommodations cost 1800 total" or "11 single accommodations cost 1800 each"?
 
Hi Tisa ,


First , assume the data you have given is entered as follows :


Singles Doubles Total No. of People Price

11 13 37 55550


where 11 and 13 are entered data ( in cells A11 and B11 ) , and 37 and 55550 are calculated ( in cells C11 and D11 ).


The cell C11 should have the following formula :


=A11+B11*2


The cell D11 should have the following formula :


=IF(C11<30,A11*2250+B11*2950,A11*1800+B11*2750)


I have assumed that if the total number of people on the trip falls below 30 , the prices for the rooms are as follows :


Singles - goes up from 1800 to 2250


Doubles - goes up from 2750 to 2950


Narayan
 
@GCExcel. Good catch. I didn't read carefully. I thought in terms of a hotel owner packaging a deal for a tour company.


That said, I have seen people travelling solo opting for a double occupany for the extra space. some hotel's single occupany is really tiny and cramp. and couple traveling opting for a single room to safe some money.


From the perspective of a motel/hotel owner he only cares about the combination of the single and double room renting out, not really about how many people renting what type of room, unless it breaks the fire codes.
 
Narayan what you said is correct. The single rate is 1800.00 each person and the double is 2750.00 each person. I guess I have to figure out the best way to put everything into my spreadsheet. This site is awesome!!! THANK YOU to everyone that's trying to help me for I greatly appreciate your time and patience.
 
Thank you again Narayan. I actually broke the last formula you sent down into 2 parts. That way I was able to show my instuctor the price increase for the 11 single rooms and for the 13 double rooms.
 
Back
Top