Problem modifying INDEX formula

sofas

Well-known Member
Joined
Sep 11, 2022
Messages
559
Office Version
  1. 2021
  2. 2019
Platform
  1. Windows
Hello. Please help to modify the following formula so that I can search along column A. The formula has a condition that cell C5 matches A17 I want to do a search from A17 to A63

Code:
Sheet1!C$5=Sheet2!A17:A63

VBA Code:
=IFERROR(INDEX((Sheet1!$C$9:$G$63;Sheet1!$H$9:$M$63);MATCH(Sheet2!$T$1;Sheet1!$B$9:$B$63;0);MATCH(Sheet2!T$2;Sheet1!$H$8:$M$8;0);(IF(Sheet1!C$5=Sheet2!A17;IF(Sheet2!T$3=Sheet1!C7;1;IF(Sheet2!T$3=Sheet1!H7;2;3)))));"")
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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