Find the value for the exact or closest time

alvintranvcu123

New Member
Joined
Jan 16, 2025
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Dear all/

I have the temperature data, which were measured from 02 sources. The measuring times may be different. They could be the same or near the same in 02 sources.
I would
I would like to make it a table.

1. Exact time: show 02 temp values

2. Not exact time: show 02 temp which one temp is the closest time in table 1.

( 1)
10:04:04 AM1455
10:04:14 AM1463
10:04:24 AM1458
10:04:34 AM1463
10:04:44 AM1472
10:04:54 AM1487
10:05:04 AM1496
10:05:14 AM1504
(2)
10:01:59 AM1565
10:04:07 AM1548
10:05:30 AM1568
10:06:00 AM1564
10:07:27 AM1566
10:08:27 AM1535
10:09:31 AM1545
10:09:57 AM1545
 
Dear.
I have big data for table 1.
+Range table 2: C3:C102, B3:B102
+Range table 1: E3:E2471

I tried to expand the range for your formula, but it still won't work. sorry for my poor Excel skill

1737443487243.png
 
Upvote 0

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
It appears that you need to explicitly define the LAMBDA function in the BYCOL/BYROW in some version of XL. Try:
Excel Formula:
=LET(
t,TOROW(C3:C102),a,ABS(TOROW(B3:B102)-E3:E2471),r,ROWS(a),
BYROW(IF((SEQUENCE(r)=r)+(a=BYROW(a,LAMBDA(x,MIN(x))))*(a=BYCOL(a,LAMBDA(x,MIN(x)))),t,""),LAMBDA(x,XLOOKUP(TRUE,x<>"",x,"",,-1)))
)
 
Upvote 0
Oh, it works well.

still has a small issue.

Table 2 time format is 1/16/2025 10:18:26 AM
Table 1 time format is 10:18:26 AM

So the formula didn't work unless I erase date.
I changed the format but still didn't work. How can I remove the date "1/16/2025" from table 2 to become exact same time format as table 1.
 
Upvote 0
Try adding MOD.
Rich (BB code):
=LET(
t,TOROW(C3:C102),a,ABS(TOROW(MOD(B3:B102,1))-E3:E2471),r,ROWS(a),
BYROW(IF((SEQUENCE(r)=r)+(a=BYROW(a,LAMBDA(x,MIN(x))))*(a=BYCOL(a,LAMBDA(x,MIN(x)))),t,""),LAMBDA(x,XLOOKUP(TRUE,x<>"",x,"",,-1)))
)
 
Upvote 0

Forum statistics

Threads
1,225,738
Messages
6,186,725
Members
453,368
Latest member
positivemind

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