Need a formula.

faraz502

Board Regular
Joined
Mar 26, 2014
Messages
127
Office Version
  1. 2016
Platform
  1. Windows
Dear Sir,

I have a sheet in below mentioned format i need a formula in column H that will collect data with matches the ID and Date and give me the reason in column H.

The reason available in Sheet2 format is given below


Format for required formula.
ABCDEFGHIJKLM
ID​
Geofence name
Date​
Zone in​
Zone out​
Duration​
NAR​
Reason​
DT​
Route length​
Top speed​
Average speed​
Average speed (d/t)​
DEW6086​
DEW6086__H_Dewan_Sujawal (S2-BDN-02) Macro Jazz Host
20-08-2023​
20-08-2023 10:46:56 PM​
20-08-2023 10:51:01 PM​
4min 5s​
90.29%​
???​
1238​
0.74 Km​
20 kph​
15 kph​
11 kph​
DEW6086​
DEW6086__H_Dewan_Sujawal (S2-BDN-02) Macro Jazz Host
20-08-2023​
20-08-2023 11:03:12 PM​
20-08-2023 11:07:30 PM​
4min 18s​
90.29%​
???​
-​
0.65 Km​
45 kph​
18 kph​
9 kph​
TTA0435​
TTA0435__S_National_Highway_3_warid_MR065276 (S2-BDN-02) Macro Jazz Host/CM-PAK Guest
20-08-2023​
20-08-2023 03:48:23 PM​
20-08-2023 03:59:31 PM​
11min 8s​
95.19%​
???​
74​
0.22 Km​
12 kph​
9 kph​
1 kph​
TTA0435​
TTA0435__S_National_Highway_3_warid_MR065276 (S2-BDN-02) Macro Jazz Host/CM-PAK Guest
20-08-2023​
20-08-2023 08:20:31 PM​
20-08-2023 08:55:53 PM​
35min 22s​
95.19%​
???​
-​
0.24 Km​
9 kph​
7 kph​
0 kph​

Format of sheet2 reason available in Column J
ABCDEFGHIJK
CodeSiteOccurringClearingDTPriorityTypeMBU#CategoryDetailed ReasonsDate
TTA0435TTA0435
2023-07-01 00:00:00​
2023-07-01 23:59:59​
1439.983333​
GeneralMacroS2-NSH-05BSS - Hardware Fault - HW ReplacedHardware Issue // RRU Is Required At Subjected Site.07-01-2023
DEW6086DEW6086
2023-07-01 09:48:25​
2023-07-01 23:59:59​
851.5666667​
GeneralMacroS2-DDU-06Power Issue On OMOUfone/omo power issue07-01-2023
DEW6086DEW6086
2023-07-01 09:48:25​
2023-07-01 23:59:59​
851.5666667​
GeneralMacroS2-DDU-06Power Issue On OMOUfone/omo power issue07-01-2023
DEW6086DEW6086
2023-07-01 09:48:25​
2023-07-01 23:59:59​
851.5666667​
GeneralMacroS2-DDU-06Power Issue On OMOUfone/omo power issue07-01-2023
TTA0435TTA0435
2023-07-01 00:00:00​
2023-07-01 12:15:18​
735.3​
GeneralMacroS2-MPK-03Power Issue On OMOAccess Issue // Unsafe Area To Visit In Night Hours At subjected Site // Ufone Shared Site // OMO Power Issue At Subjected Site.07-01-2023
TTA0435TTA0435
2023-07-01 00:00:00​
2023-07-01 12:15:11​
735.1833333​
GeneralMacroS2-MPK-03Power Issue On OMOAccess Issue // Unsafe Area To Visit In Night Hours At subjected Site // Ufone Shared Site // OMO Power Issue At Subjected Site.07-01-2023
TTA0435TTA0435
2023-07-01 00:00:00​
2023-07-01 12:15:08​
735.1333333​
GeneralMacroS2-MPK-03Power Issue On OMOAccess Issue // Unsafe Area To Visit In Night Hours At subjected Site // Ufone Shared Site // OMO Power Issue At Subjected Site.07-01-2023
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Lots of people had looked at your thread but not answered. Quite likely because they didn't want to type out all that sample data to test with. I suggest that you investigate XL2BB for providing sample data to make it easier for helpers.

In any case, try something like this in H2
Excel Formula:
=INDEX(Sheet2!J:J,AGGREGATE(15,6,ROW(Sheet2!J$2:J$1000)/((Sheet2!A$2:A$1000=A2)*(Sheet2!K$2:K$1000=C2)),1))
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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