Is it possible to lookup each value in an array?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello

I have an array that returns {A,B}

I want to replace A and B by XLOOKUP(A,A:A,B:B)&" "&A and XLOOKUP(B,A:A,B:B)&" "&B

I am struggling because it seems I need some kind of loop to do that as the array can contain any number of values.

Any idea?

Thanks!
 

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.
Just a guess, because I'm not clear what you mean by an array that returns {A, B}?

Are you looking for something like this?

Book3
ABCDEFGHI
1
2MyArray1Result1
31375E 13C 7B 5
43A
5MyArray2Result2
6313A 3E 13
75B53B 5A 3
877C 7C 7
97C115D 11B 5
10
1111D
12
13
14
1513E
Sheet1
Cell Formulas
RangeFormula
G3:I3G3=XLOOKUP(MyArray1,A:A,B:B)&" "&MyArray1
G6:H9G6=XLOOKUP(MyArray2,A:A,B:B)&" "&MyArray2
Dynamic array formulas.
Named Ranges
NameRefers ToCells
MyArray1=Sheet1!$D$3:$F$3G3
MyArray2=Sheet1!$D$6:$E$9G6
 
Upvote 0

Forum statistics

Threads
1,215,808
Messages
6,127,008
Members
449,351
Latest member
Sylvine

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