lookup value with two criteria with array

faizee

Board Regular
Joined
Jan 28, 2009
Messages
214
Office Version
  1. 2016
Platform
  1. Windows
hi
can anyone help me in following lookup value with multiple criteria, but i want with array
plus, which is faster. array formula or vlookup?
datecodeRate
25-May-216139740.376
24-Jun-216139740.376
15-Sep-216139740.376
20-Sep-216139740.376
29-Oct-216139740.39
21-Dec-216139740.39
18-Mar-226131000.444444
18-Mar-226139740.421
11-Apr-226139740.421
date18-Mar-22
code613974
Rate(need to find this with array(
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
excel 2016
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Thanks for updating your profile. (y)

This is how I would do it with your Excel version.

22 06 14.xlsm
ABC
1datecodeRate
225-May-216139740.376
324-Jun-216139740.376
415-Sep-216139740.376
520-Sep-216139740.376
629-Oct-216139740.39
721-Dec-216139740.39
818-Mar-226131000.444444
918-Mar-226139740.421
1011-Apr-226139740.421
11
12
13date18-Mar-22
14code613974
15Rate0.421
Lookup
Cell Formulas
RangeFormula
B15B15=INDEX(C:C,AGGREGATE(15,6,ROW(C2:C10)/((A2:A10=B13)*(B2:B10=B14)),1))
 
Upvote 0
Thank you so much Mr Peter..
i also used following formula. could you please if the records are more than 10,000 rows. so which formula will work faster. your or mine?
datecodeRatedate&code
25-May-216139740.37644341613974
24-Jun-216139740.37644371613974
15-Sep-216139740.37644454613974
20-Sep-216139740.37644459613974
29-Oct-216139740.3944498613974
21-Dec-216139740.3944551613974
18-Mar-226131000.4444444638613100
18-Mar-226139740.42144638613974
11-Apr-22613974555544662613974
date18-Mar-22
code613100
Rate=INDEX(C2:C10,MATCH(B13&B14,D2:D10,0),1)
 
Upvote 0
i also used following formula.
It may be extremely unlikely with your data, but that formula could produce incorrect results under some circumstances. For example, with the dummy data below it returns 0.55555 and not the correct figure of 0.44444

22 06 14.xlsm
ABCD
1datecodeRatedate&code
225-May-216139740.37644341613974
324-Jun-216139740.37644371613974
420-Mar-1286131000.5555544638613100
520-Sep-216139740.37644459613974
629-Oct-216139740.3944498613974
721-Dec-216139740.3944551613974
818-Mar-226131000.4444444638613100
918-Mar-226139740.42144638613974
1011-Apr-22613974555544662613974
11
12
13date18-Mar-22
14code613100
15Rate0.55555
Lookup (2)
Cell Formulas
RangeFormula
A4A4=4463
D2:D10D2=A2&B2
B15B15=INDEX(C2:C10,MATCH(B13&B14,D2:D10,0),1)


if the records are more than 10,000 rows. so which formula will work faster. your or mine?
You could test that as easily as I could. ;)
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
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