UDF with horizontal and vertical search array and multiple argument

TG2812

Board Regular
Joined
Apr 15, 2015
Messages
180
Hello All,

I need your help.
I'm working on a file where I need to search horizontally and vertically with multiple conditions.

What i did try before coming asking for help here?
a) I tried an array formula which worked. However my file contains more than 50,000 rows. This makes the file way too heavy.
b) I tried a simple index match formula with an helper column which worked as well. However, this does not really help for the future use of my file..

The only solution left if to create a UDF. I browsed around but I could not find any UDF that could really suit my needs and I'm a bit of a beginner when it comes to creating UDF.

I have included an example of what I'm looking for.
In a nutshell;

1) I have two worksheets (Sheet 1 & Sheet2).
2) I need to lookup value of the Sheet2 into Sheet 1 based on the correct date (horizontal array), correct model (vertical array), correct region (vertical array), correct configuration (vertical array)

Important note: the UDF needs to have more than 3 conditions as I may face this scenario in the future.

Sheet1:

ModelRegionConfigurationJan-19Feb-19Mar-19Apr-19 May-19
Model 1Region 1Configuration 1
Model 7Region 1Configuration 8
Model 1Region 4Configuration 2
Model 4Region 4Configuration 4

<tbody>
</tbody>


Sheet2:

ModelRegionConfigurationJan-19Feb-19Mar-19Apr-19May-19
Model 1Region 4Configuration 221918189
Model 3Region 2Configuration 5091753
Model 7Region 1Configuration 8000019
Model 2Region 6Configuration 376871

<tbody>
</tbody>


Thank you very much in advance for helping me =)
 
Those Offsets are slowing things down.

=Sheet2!$C$2:INDEX(Sheet2!$C:C,COUNTA(Sheet2!$C:$C), 1)

is a non volatile definition of Config1.

The other OFFSET can be replaced by similar formulas.
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

Forum statistics

Threads
1,216,231
Messages
6,129,631
Members
449,522
Latest member
natalia188

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