how can adjust my xlookup formula

curiouscoder

New Member
Joined
Jun 24, 2022
Messages
31
Office Version
  1. 365
Platform
  1. Windows
my formula in each status column
Excel Formula:
=IF([@Status]="","",IFERROR(XLOOKUP(F2&'DROPDOWN CATS'!$A$8,Table2[Customer ID]&Table2[New Status],Table2[Date + Time],,,-1),""))

$A$8 is where the "assigned" is being grabbed from in another sheet, so $A$9 would be "in progress" etc.

status is drop down list of options, assigned, in progress and everything after that are the statuses

here is a small snippet of my table, there are more statuses after "in progress" but have not been included

Alert IDCustomer IDEntity TypeStatusPod (Team)ReviewerAssignedIn Progress
J1
J21 - Assigned
01/07/2022 10:24:43​
01/07/2022 09:53:41​
J31 - Assigned
01/07/2022 10:19:57​
J41 - Assigned
01/07/2022 10:24:52​
J51 - Assigned
01/07/2022 10:15:31​
J62 - In Progress
01/07/2022 10:27:08​
01/07/2022 10:27:16​
J7
J82 - In Progress
01/07/2022 10:27:21​
01/07/2022 10:27:24​

the XLOOKUP is looking up the values and returning them from this table:

Date + TimeCell ChangedOld StatusNew StatusCustomer IDDateTime
01/07/2022 09:50​
$H$31 - AssignedJ2
01/07/2022​
09:50​
01/07/2022 09:53​
$H$32 - In ProgressJ2
01/07/2022​
09:53​
01/07/2022 09:53​
$H$33 - Escalated Pre CCJ2
01/07/2022​
09:53​
01/07/2022 09:53​
$H$34 - Sent for Initial CheckJ2
01/07/2022​
09:53​
01/07/2022 09:53​
$H$35 - Returned from Initial CheckJ2
01/07/2022​
09:53​
01/07/2022 09:53​
$H$36 - Sent for CCJ2
01/07/2022​
09:53​
01/07/2022 09:53​
$H$37 – Request for more info from CCJ2
01/07/2022​
09:53​
01/07/2022 09:54​
$H$291 - AssignedJ76
01/07/2022​
09:54​
01/07/2022 10:07​
$H$37 – Request for more info from CC1 - AssignedJ2
01/07/2022​
10:07​
01/07/2022 10:13​
$H$21 - Assigned2 - In ProgressJ1
01/07/2022​
10:13​
01/07/2022 10:13​
$H$21 - Assigned3 - Escalated Pre CCJ1
01/07/2022​
10:13​
01/07/2022 10:14​
$H$281 - Assigned1 - AssignedJ27
01/07/2022​
10:14​
01/07/2022 10:14​
$H$23 - Escalated Pre CC2 - In ProgressJ1
01/07/2022​
10:14​
01/07/2022 10:14​
$H$22 - In Progress1 - AssignedJ1
01/07/2022​
10:14​
01/07/2022 10:15​
$H$61 - AssignedJ5
01/07/2022​
10:15​
01/07/2022 10:15​
$H$291 - AssignedJ76
01/07/2022​
10:15​
01/07/2022 10:16​
$H$291 - Assigned1 - AssignedJ76
01/07/2022​
10:16​
01/07/2022 10:16​
$H$291 - Assigned1 - AssignedJ76
01/07/2022​
10:16​
01/07/2022 10:16​
$H$291 - Assigned1 - AssignedJ76
01/07/2022​
10:16​
01/07/2022 10:19​
$H$41 - AssignedJ3
01/07/2022​
10:19​
01/07/2022 10:24​
$H$31 - AssignedJ2
01/07/2022​
10:24​
01/07/2022 10:24​
$H$51 - AssignedJ4
01/07/2022​
10:24​
01/07/2022 10:25​
$H$181 - AssignedJ17
01/07/2022​
10:25​
01/07/2022 10:26​
$H$21 - AssignedJ1
01/07/2022​
10:26​
01/07/2022 10:27​
$H$71 - AssignedJ6
01/07/2022​
10:27​
01/07/2022 10:27​
$H$72 - In ProgressJ6
01/07/2022​
10:27​
01/07/2022 10:27​
$H$91 - AssignedJ8
01/07/2022​
10:27​
01/07/2022 10:27​
$H$92 - In ProgressJ8
01/07/2022​
10:27​
01/07/2022 10:27​
$H$101 - AssignedJ9
01/07/2022​
10:27​
01/07/2022 10:27​
$H$102 - In ProgressJ9
01/07/2022​
10:27​
01/07/2022 10:30​
$H$21 - Assigned2 - In ProgressJ1
01/07/2022​
10:30​
01/07/2022 10:31​
$H$21 - Assigned2 - In ProgressJ1
01/07/2022​
10:31​
01/07/2022 10:33​
$H$22 - In Progress1 - AssignedJ1
01/07/2022​
10:33​
01/07/2022 10:34​
$H$111 - AssignedJ10
01/07/2022​
10:34​
01/07/2022 10:34​
$H$112 - In ProgressJ10
01/07/2022​
10:34​
01/07/2022 10:34​
$H$113 - Escalated Pre CCJ10
01/07/2022​
10:34​
01/07/2022 10:34​
$H$111 - AssignedJ10
01/07/2022​
10:34​
01/07/2022 10:34​
$H$111 - AssignedJ10
01/07/2022​
10:34​
01/07/2022 10:35​
$H$112 - In ProgressJ10
01/07/2022​
10:35​
01/07/2022 10:35​
$H$113 - Escalated Pre CCJ10
01/07/2022​
10:35​

so the table above is a changelog that automatically records the values when a status is changed in table 1 and automatically records it on here with the details provided above.

the xlookup then refers to this table by grabbing the Customer ID and status column that matchup in table 1 and returns the date and time in table 1 under each status column.

my question is when for example from table 1, customer ID, J2 has 2 timestamps. when i delete the status in the drop down to start again all the entries for the dates with that customer ID disappear (I want this)

but if I click on the first status "assigned" for J2 again I want it to only show me the timestamp for "assigned", yet it returns all previous records, thus populating "assigned" and "in progress".

i know it would update one at a time like i wanted if i cleared the changelog but I want to keep it.


is there a way I can amend my formula with something like an IF statement to get it how I want?


thank you
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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