Select Newest date related a value

secoo140

Board Regular
Joined
Oct 12, 2013
Messages
85
Office Version
  1. 2010
Platform
  1. Windows
NB54w.jpg





I want to select newest PET date. But I can not figure it how.


IF B:B is PET
then select newest date?
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
How about


Excel 2013/2016
ABC
113/10/2017SPECT/BT15/10/2018
201/02/2018SPECT/BT
311/03/2018PET-Ga68
411/04/2018SPECT/BT
512/05/2018SPECT/BT
613/06/2018PET-Ga68
713/07/2018PET-Ga69
814/10/2018PET-Ga70
915/10/2018PET-Ga71
1015/10/2018SPECT/BT
Sheet2
Cell Formulas
RangeFormula
C1{=MAX(IF(LEFT(B1:B10,3)="PET",A1:A10))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
I use excel 2010
and this formula doesnt work.

LEFT(B1:B10,3)="PET"

it says error B10,3
 
Upvote 0
I use excel 2010
and this formula doesnt work.

LEFT(B1:B10,3)="PET"

it says error B10,3

Does your Excel version use semicolon (;) as argument separator?
If so, try
=MAX(IF(LEFT(B1:B10;3)="PET";A1:A10))
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Last edited:
Upvote 0
IT WORKS!
thank you so much!

ctrl shift enter was crucial. my fault


Does your Excel version use semicolon (;) as argument separator?
If so, try
=MAX(IF(LEFT(B1:B10;3)="PET";A1:A10))
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0
It looks like date order so could go with:

=INDEX($A$1:$A$1000,MATCH("PET*",$B$1:$B$1000,0))
 
Upvote 0
It looks like date order so could go with:

=INDEX($A$1:$A$1000,MATCH("PET*",$B$1:$B$1000,0))

Steve,

Your formula returns the first match, not the last.
Assuming the dates in ascending order maybe...
=LOOKUP(2,1/(LEFT(B1:B1000,3)="PET"),A1:A1000)

M.
 
Upvote 0

Forum statistics

Threads
1,215,356
Messages
6,124,475
Members
449,164
Latest member
Monchichi

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