Lookup non consecutive columns

ozbeachbum

Board Regular
Joined
Jun 3, 2015
Messages
161
Office Version
  1. 2021
Platform
  1. Windows
Hi,
I have two ranges: L214:L232 & T214:T232

I need a formula to lookup the last value from the combined ranges.

Thanks in advance.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Try:

Excel Formula:
=LET(a,L214:L232,b,T214:T232,s,SEQUENCE(ROWS(a)),m,MAX(s*(a<>"")),n,MAX(s*(b<>"")),IF(m+n=0,"",IF(m>n,INDEX(a,m),INDEX(b,n))))
 
Upvote 0
The requirement is not clear to me. For example, with my sample data, what is the "last value from the combined ranges"?

Is it "g" because that is the most right value in the highest row number with any value?
Or is it "z" because that is the last value in the right-most column of the two?
Or is it something else?

24 03 12.xlsm
LMST
214ax
215by
216cz
217d
218e
219f
220g
221
222
223
224
225
226
227
228
229
230
231
232
Last
 
Upvote 0
Hi Peter,
In your example it currently would be G as I have nothing in COLUMN T at present.
I was using the following formula which only referenced COLUMN L and worked fined for that.
=LOOKUP(2,1/(L214:L232<>""),L214:L232)
In your example with a formula that would reference both COLUMN L & COLUMN T it would be Z. (There would be entries in each row of COLUMN L)
Tried a number of different options to no success, just could not work out how to bring COLUMN T into the formula.
%DifferenceChange Date%Difference# C
5.82%5.82%00
6.07%0.25%Last Rate
6.32%0.25%6.32%/=LOOKUP(2,1/(L214:L232<>""),L214:L232)
Tried to insert Mini Sheet again, thought I was going to have some success, it copies to the clipboard, but wont past to the thread.
Above was the best I could come up with to show the sheet.

Thanks for all your efforts with me.
 
Upvote 0
Tried to insert Mini Sheet again, thought I was going to have some success, it copies to the clipboard, but wont past to the thread.
If you are using the latest version of XL2BB (version v2.1) try checking the box the red arrow is pointing to, then click Mini Sheet, when the new box appears copy the data with Ctrl + C, then paste in the thread with Ctrl + V


1710279659153.png
 
Upvote 0
In your example with a formula that would reference both COLUMN L & COLUMN T it would be Z. (There would be entries in each row of COLUMN L)
If I have understood that correctly, and assuming col T is not populated by formulas, try
Excel Formula:
=LET(t,T214:T232,r,IF(COUNTA(t),t,L214:L232),LOOKUP(2,1/(r<>""),r))

If col T is formulas, try
Excel Formula:
=LET(t,T214:T232,r,IF(COUNTIF(t,"?*"),t,L214:L232),LOOKUP(2,1/(r<>""),r))
 
Upvote 0
Solution
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,583
Messages
6,125,661
Members
449,247
Latest member
wingedshoes

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