Index and Match with 2 array Prob's

moldysp

New Member
Joined
Dec 20, 2023
Messages
5
Office Version
  1. 2021
Platform
  1. Windows
  2. Mobile
hello, I want to use the index and match formula but with 2 adjacent arrays (OH & OJ),
is there a formula that I can add ? please help 😄

CEK1.png
CEK2.png
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
try
=index(P35:P40, match(N33&O33,N35:N40&O35:O40,0))
 
Upvote 0
try
=index(P35:P40, match(N33&O33,N35:N40&O35:O40,0))
oh thanks in advance, but if I want to change O33 to OH or OJ and the P33 value also changes, what formula can I add?
CEK OK.png
 
Upvote 0
=index(P35:P40, match(N33&O33,N35:N40&O35:O40,0))

you could use an IF
assuming if its NOT OH then it is OJ
otherwise a nested IF

=INDEX(IF(O33="OH",P35:P40,R35:R40), MATCH(N33&O33,N35:N40&IF(O33="OH",O35:O40,Q35:Q40),0))

Book2
MNOPQRS
32
33PenOJ104
34
35ddOH7OJ100
36AOH1OJ101
37BOH2OJ102
38cOH3OJ103
39PENOH4OJ104
40dOH5OJ105
Sheet2
Cell Formulas
RangeFormula
P33P33=INDEX(IF(O33="OH",P35:P40,R35:R40), MATCH(N33&O33,N35:N40&IF(O33="OH",O35:O40,Q35:Q40),0))
 
Upvote 1
Solution
=index(P35:P40, match(N33&O33,N35:N40&O35:O40,0))

you could use an IF
assuming if its NOT OH then it is OJ
otherwise a nested IF

=INDEX(IF(O33="OH",P35:P40,R35:R40), MATCH(N33&O33,N35:N40&IF(O33="OH",O35:O40,Q35:Q40),0))

Book2
MNOPQRS
32
33PenOJ104
34
35ddOH7OJ100
36AOH1OJ101
37BOH2OJ102
38cOH3OJ103
39PENOH4OJ104
40dOH5OJ105
Sheet2
Cell Formulas
RangeFormula
P33P33=INDEX(IF(O33="OH",P35:P40,R35:R40), MATCH(N33&O33,N35:N40&IF(O33="OH",O35:O40,Q35:Q40),0))
Thankyou So Much Etaf, it works 🙏
 
Upvote 0

Forum statistics

Threads
1,223,923
Messages
6,175,391
Members
452,640
Latest member
steveridge

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