Looking for a value based on a date and value from 2 different cells.

Tej92

Board Regular
Joined
Sep 27, 2022
Messages
73
Office Version
  1. 365
Platform
  1. Windows
Hello everyone!
from the following table
Raised onActionAssigned dateAssigned tocompleted
19/01/2023​
Extra equipment in the area
20/02/2023​
John Doe
06/02/2023​
29/01/2023​
No location for extra equipment
20/02/2023​
John Doe
open​

I'd like the cell to return the oldest action if under the completed column is still "open".
how can i do it?

Thanks in advance for the help!
 

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.
I think I understand better now. Try this instead

23 03 07.xlsm
ABCDEFG
1Raised onActionAssigned dateAssigned toCompleted
219/01/2023this is action 110/02/2023Tej6/02/2023this is action 4
323/01/2023this is action 216/02/2023Joeopen
428/01/2023this is action 311/03/2023john10/02/2023
520/01/2023this is action 418/03/2023Markopen
6
Tej92 (2)
Cell Formulas
RangeFormula
G2G2=INDEX(SORT(FILTER(A2:B100,E2:E100="open"),1),1,2)
 
Upvote 1
Solution
Will this work?:
Book1
ABCDEF
1Raised onActionAssigned dateAssigned tocompleted
22023-01-19Extra equipment in the area2023-02-20John Doe2023-02-062023-02-20
32023-01-29No location for extra equipment2023-02-20John Doeopen 
4
Sheet3
Cell Formulas
RangeFormula
F2:F3F2=IF(E2="open","",MAX(A2,C2))
 
Upvote 0
if you need the action text, then this may work:

Book1
ABCDEFG
1Raised onActionAssigned dateAssigned tocompletedLast Action DateAction
22023-01-19Extra equipment in the area2023-02-20John Doe2023-02-062023-02-20Extra equipment in the area
32023-01-29No location for extra equipment2023-02-20John Doeopen  
Sheet3
Cell Formulas
RangeFormula
F2:F3F2=IF(E2="open","",MAX(A2,C2))
G2:G3G2=IF(E2="open","",B2)
 
Upvote 0
Hi @awoohaw, thank you very much for the reply.

the table i posted is going to be quite long and there are several worksheets with data in the same format.
i have a general worksheet that has the titles of all the worksheets and next to it I need excel to write the action (column "B") by looking for the oldest (column "A") that has "open" (column "E").

how do you think i can achieve that?
 
Upvote 0
=VLOOKUP("open",CHOOSE({1,2},'area 1_Actions'!F:F,'area 1_Actions'!C:C),2,FALSE)

Managed to make it work using this formula.
 
Upvote 0
I need excel to write the action (column "B") by looking for the oldest (column "A") that has "open" (column "E").
The formula in post #5 does not do that. It does not look at column A or column E at all. Perhaps you have changed your layout &/or requirement?

There may be a shorter &/or more efficient formula to get what you want if you would care to give a bit larger sample data and expected result(s), preferably with XL2BB so we can better see where the data is and easily copy it to our sheet for testing.
 
Upvote 0
Hi Peter, I Couldn't find anything online so wrote that formula as it return the first action that is open reading from the top. The actions are being submitted from another sheet by various users with a vba button. So the first action to be open from the top works for me.
At work we are not allowed to download extensions or software from the web so won't be able to send the XL2BB i can try to paste the table or upload a tesst file in the next couple of hours when i get the time.
Thanks again for the reply.

Tej.
 
Upvote 0
Hi @Peter_SSs, yes the table has changed a little.
desired result: "this is action 4"
the formula has to look through the column E for "open" and then the oldest date in column A and return the action from column B.



ABCDE
Raised onActionAssigned dateAssigned toCompleted
19/01/2023this is action 110/02/2023Tej06/02/2023
23/01/2023this is action 216/02/2023Joeopen
28/01/2023this is action 311/03/2023john10/02/2023
20/01/2023this is action 4 18/03/2023Markopen
 
Upvote 0
Still not sure that I fully understand, but what about this?

23 03 07.xlsm
ABCDEFG
1Raised onActionAssigned dateAssigned toCompleted
219/01/2023this is action 110/02/2023Tej6/02/2023this is action 4
323/01/2023this is action 216/02/2023Joeopen
428/01/2023this is action 311/03/2023john10/02/2023
520/01/2023this is action 418/03/2023Markopen
Tej92
Cell Formulas
RangeFormula
G2G2=INDEX(SORT(INDEX(A:A,MATCH("open",E:E,0)):B100,1),1,2)
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,831
Members
449,190
Latest member
rscraig11

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