Index Match with an IF

ABG123

New Member
Joined
Aug 8, 2022
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
Hi all
Hope everybody is well.
I am currently trying to build a quote sheet that looks up values based on a quote number.

Example data sheet below, so I would add in the "1's" where I needed them:
1659955474322.png


And I am trying to get it to populate Column C with the "1" on a different tab, based on the number in Cell P1
1659955636446.png


So if I were to amend that number to in P1 "55", I would want the "1's" to appear in Test 1, Test 3 and Test 5.

I can index match, but can't seem to figure out how to do it!

All help appreciated.

Thanks in advance.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
How about
Excel Formula:
=INDEX(Sheet1!$C$2:$G$10,MATCH($P$1,Sheet1!$A$2:$A$10,0),MATCH(B2,Sheet1!$C$1:$G$1,0))
 
Upvote 0
How about
Excel Formula:
=INDEX(Sheet1!$C$2:$G$10,MATCH($P$1,Sheet1!$A$2:$A$10,0),MATCH(B2,Sheet1!$C$1:$G$1,0))

Hi Fluff, thanks for the quick reply. Will give that a go ASAP. For my future information, can you please advise what the B2 is doing in the final match? Thank you
 
Upvote 0
That's a typo & it should be A2.
 
Upvote 0
In that case can you post some sample data from both sheets.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
In that case can you post some sample data from both sheets.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Thank you very much, sir. Here we go! So the first one is the Front Sheet, where I would like to amend Cell H2 to different quote numbers (I created a new dummy sheet for ease)

Example Workbook.xlsx
ABCDEFGH
1ProductCostQTYQuote42
2Product 1£5.00
3Product 2£10.00
4Product 3£15.00
5Product 4£20.00
6Product 5£25.00
7Product 6£30.00
8Product 7£35.00
9Product 8£40.00
10Product 9£45.00
Pricings


The next one is my data sheet, where I will be putting values under the products:

Example Workbook.xlsx
ABCDEFGHIJKL
1Quote NumberCustomerDateProduct 1Product 2Product 3Product 4Product 5Product 6Product 7Product 8Product 9
242Telly Ltd08/08/2022121
343Fabien08/08/20221
444Humbert & Co08/08/202211
Data


Thank you for your help so far! Much appreciated!
 
Upvote 0
Thanks for that, the formula I suggested works for
Fluff.xlsm
ABCDEFGH
1ProductCostQTYQuote42
2Product 151
3Product 2100
4Product 3150
5Product 4202
6Product 5250
7Product 6300
8Product 7351
9Product 8400
10Product 9450
Main
Cell Formulas
RangeFormula
C2:C10C2=INDEX(Data!$D$2:$L$4,MATCH($H$1,Data!$A$2:$A$4,0),MATCH(A2,Data!$D$1:$L$1,0))


Did you change the sheet name & ranges to suit?
 
Upvote 0
Solution
Thanks for that, the formula I suggested works for
Fluff.xlsm
ABCDEFGH
1ProductCostQTYQuote42
2Product 151
3Product 2100
4Product 3150
5Product 4202
6Product 5250
7Product 6300
8Product 7351
9Product 8400
10Product 9450
Main
Cell Formulas
RangeFormula
C2:C10C2=INDEX(Data!$D$2:$L$4,MATCH($H$1,Data!$A$2:$A$4,0),MATCH(A2,Data!$D$1:$L$1,0))


Did you change the sheet name & ranges to suit?

Amazing! All sorted. Thank you very much. Must have been my human error after your first message. Very much appreciate your time. Have a great day.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,909
Messages
6,122,189
Members
449,072
Latest member
DW Draft

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