Need a program/ formula using if else condition to check the required column/cell

jazz

New member
Joined
Nov 4, 2016
Messages
7
Reaction score
0
Points
0
Dear Experts,

I have a master sheet which contains the types of rooms like deluxe, super deluxe, single, double, suite etc.
Each type of the rooms have prices below for example for 1 day $10 and for 2 days 18 and for 3 days $24 etc.
The prices for each category for different days are maintained in the master sheet or the 1st sheet of the excel file.

In the second sheet we are maintaining the bookings of each day. I have driven the number of days by subtracting the check-out date - check-inn date. I also have the type of room in the next column.
I'm looking for formula to check the type of room & number of days and go select the price from the first sheet and display in the second sheet.

Can anyone please advise me how this can be achieved. If possible please help me with a piece of code.

Thanks in advance for your time
Jazz
 
Hi
perhaps post a sample sheet with your data and expected results? (click Go advanced - Manage attachments)
 
Hello Pecoflyer,

Much appreciated for your reply and time.

I have attached the sample file with the expected value in it.

Please could you help me to achieve the result im looking for.

Thanks
Jazz
 

Attachments

  • Sample - Jazz.xls
    35 KB · Views: 19
In I2 copied down:

=INDEX(Sheet1!$B$2:$D$31,MATCH(Sheet2!F2,Sheet1!$A$2:$A$31,0),MATCH(Sheet2!G2,Sheet1!$B$1:$D$1,0))
 
Hi Ali,

Wow..Brilliant.

It is working fine with the first row but for the following rows the result is same as the first one.
Could you please modify the formula to select both the column 'F' and 'G' from the sheet 2 and take the corresponding value from the sheet 1 for the Column 'H' in sheet 2.

Thanks in advance
Jazz
 
That is precisely what it does! It works perfectly here, so you are going to have to be clearer about what you mean.

By the way, there is a leading space in cell D1 on Sheet 1 that needs removing so that you don't get an error in the last cell of the range on Sheet 2.
 
Last edited:
Thanks Ali,

All works fine. Great help.
 
Hi Jazz
if you have a new question it's always best to create a new thread than continue a solved one. I did it for you this time
If necessary add a link to the original thread.
This will get you faster answers ( supposing Ali does not login for a while)
Cheers
 
Back
Top