Look-up and return a cell value when a specific condition is met

JAV1

New Member
Joined
Feb 24, 2022
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hello Excel Pros, is there a way to return a cell value based on a specific condition? Attached is a simple spreadsheet where a formula is sought to return a Complete Date from the first "PM" Problem Type row when the Unit # remains same. Thank you in advance!
Look-up and cell value return when a specific condition is met.xlsx
ABCD
1Complete DateUnit #Problem TypeFormula needed to have the following Outcome
21/10/2018 14:18400LG1/29/2018 16:18
31/10/2018 20:12400CM1/29/2018 16:18
41/11/2018 13:30400CM1/29/2018 16:18
51/17/2018 13:03400CM1/29/2018 16:18
61/26/2018 4:56400LG1/29/2018 16:18
71/29/2018 16:18400PM
81/30/2018 0:58400CM4/25/2018 14:36
91/31/2018 2:11400CM4/25/2018 14:36
102/1/2018 14:04400CM4/25/2018 14:36
112/1/2018 13:58400CM4/25/2018 14:36
122/1/2018 14:27400CM4/25/2018 14:36
132/7/2018 2:44400CM4/25/2018 14:36
143/8/2018 20:24400CM4/25/2018 14:36
153/9/2018 9:30400CM4/25/2018 14:36
163/9/2018 9:32400CM4/25/2018 14:36
174/5/2018 14:38400CM4/25/2018 14:36
184/5/2018 14:38400CM4/25/2018 14:36
194/5/2018 14:38400CM4/25/2018 14:36
204/5/2018 14:38400CM4/25/2018 14:36
214/24/2018 16:51400CM4/25/2018 14:36
224/25/2018 14:36400PM
235/1/2018 10:46402CM7/16/2018 0:00
245/2/2018 19:54402CM7/16/2018 0:00
256/8/2018 21:51402CM7/16/2018 0:00
266/10/2018 18:36402CM7/16/2018 0:00
277/16/2018 0:00402PM
287/25/2018 0:00407CM
297/25/2018 0:00407CM
307/26/2018 0:00407LG
Sheet1


1645717123167.png
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi & welcome to MrExcel.
How about
+Fluff 1.xlsm
ABCD
1Complete DateUnit #Problem Type
210/01/2018 14:18400LG29/01/2018 16:18
310/01/2018 20:12400CM29/01/2018 16:18
411/01/2018 13:30400CM29/01/2018 16:18
517/01/2018 13:03400CM29/01/2018 16:18
626/01/2018 04:56400LG29/01/2018 16:18
729/01/2018 16:18400PM 
830/01/2018 00:58400CM25/04/2018 14:36
931/01/2018 02:11400CM25/04/2018 14:36
1001/02/2018 14:04400CM25/04/2018 14:36
1101/02/2018 13:58400CM25/04/2018 14:36
1201/02/2018 14:27400CM25/04/2018 14:36
1307/02/2018 02:44400CM25/04/2018 14:36
1408/03/2018 20:24400CM25/04/2018 14:36
1509/03/2018 09:30400CM25/04/2018 14:36
1609/03/2018 09:32400CM25/04/2018 14:36
1705/04/2018 14:38400CM25/04/2018 14:36
1805/04/2018 14:38400CM25/04/2018 14:36
1905/04/2018 14:38400CM25/04/2018 14:36
2005/04/2018 14:38400CM25/04/2018 14:36
2124/04/2018 16:51400CM25/04/2018 14:36
2225/04/2018 14:36400PM 
2301/05/2018 10:46402CM16/07/2018 00:00
2402/05/2018 19:54402CM16/07/2018 00:00
2508/06/2018 21:51402CM16/07/2018 00:00
2610/06/2018 18:36402CM16/07/2018 00:00
2716/07/2018 00:00402PM 
2825/07/2018 00:00407CM 
2925/07/2018 00:00407CM 
3026/07/2018 00:00407LG 
31
Primary
Cell Formulas
RangeFormula
D2:D30D2=IF(C2="PM","",IFNA(INDEX(A2:A30,MATCH(1,(B2:B30=B2)*(C2:C30="PM"),0)),""))
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
Welcome to the Board!

Place this formula in cell D2 and copy down for all rows:
Excel Formula:
=IFERROR(IF(C2<>"PM",INDEX(A2:A$1000,MATCH("PM",C2:C$1000,0)),""),"")
 
Upvote 0
Amazing! Solutions provided by both Excel mavens Joe4 and Fluff worked like a charm. Thank you for the speedy resolution!
1645720654178.png
 

Attachments

  • 1645720456622.png
    1645720456622.png
    88.2 KB · Views: 14
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

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