Excel Query

VPLUMWOOD

New Member
Joined
Jul 13, 2021
Messages
41
Office Version
  1. 365
I have a spreadsheet and on Sheet 1 in C2 there is a drop down menu with 6 different space options. Then in D2 is a drop down with "Half Day Rate" or "Full Day Rate". Then in Sheet 2 there is a table with 3 column headings, Room, Half Day Rate and Full Day Rate. Under the Room are spaces 1 to 6 and then under each half or full day is a price for each of the spaces. The table array is I5 to I11 and Across to K5 to K11. In E2 on Sheet 1 I need a formula that will put the price in the cell depending on the Space chosen in C2 and whether it is a half or full day.

I have tried this formula but its just leaving the cell blank? Any help please - =IFERROR(IF(AND(C2<>"",D2<>""),IF(D2="Half Day Rate",INDEX(Sheet2!$J$5:$J$11, MATCH(C2, Sheet2!$I$5:$I$11, 0)), IF(D2="Full Day Rate", INDEX(Sheet2!$K$5:$K$11, MATCH(C2, Sheet2!$I$5:$I$11, 0)), "")), ""), "error")
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
what happens if you just use the index/match formulas - do you get the result you expect
also does column I5:I11 contain the text within C2

works for me
just used sheet2 - so xl2bb would show easily - formula NOT changed

Book1
ABCDEFGHIJK
1half -a-4
2dhalf day rate
3
4
5ahalf -a-1full-a-1
6bhalf -a-2full-a-2
7chalf -a-3full-a-3
8dhalf -a-4full-a-4
9ehalf -a-5full-a-5
10fhalf -a-6full-a-6
11ghalf -a-7full-a-7
12
Sheet2
Cell Formulas
RangeFormula
A1A1=IFERROR(IF(AND(C2<>"",D2<>""),IF(D2="Half Day Rate",INDEX(Sheet2!$J$5:$J$11, MATCH(C2, Sheet2!$I$5:$I$11, 0)), IF(D2="Full Day Rate", INDEX(Sheet2!$K$5:$K$11, MATCH(C2, Sheet2!$I$5:$I$11, 0)), "")), ""), "error")



Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
Try this:

Excel Formula:
=INDEX(Sheet2!I5:K11,MATCH(Sheet1!C2,Sheet2!I5:I11,0),MATCH(Sheet1!D2,Sheet2!I5:K5,0))


/Skovgaard
 
Upvote 0
Solution

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top