Find Minimum and maximum year.

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,362
Office Version
  1. 2010
Hello,

I got years in the column "C" in the range C6:C45 I want a formula, which can give me in the range C2 minimum year and in the range C3 maximum year value

*ABCD
1
2Min04/05
3Max20/21
4
5Year
619/20
718/19
820/21
919/20
1019/20
1117/18
1220/21
1317/18
1419/20
1520/21
1619/20
1720/21
1820/21
1920/21
2020/21
2120/21
2220/21
2319/20
2420/21
2518/19
2620/21
2720/21
2820/21
2904/05
3020/21
3120/21
3217/18
3320/21
3419/20
3518/19
3618/19
3720/21
3820/21
3919/20
4019/20
4120/21
4219/20
4320/21
4419/20
4518/19
46
47
48

For example, the sample image is attached.

Thank you all.

I am using Excel 2000

Regards,
Moti
 

Attachments

  • Find Min-Max.png
    Find Min-Max.png
    18.7 KB · Views: 4

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try:
Book1
ABC
2Min04/05
3Max20/21
4
5Year
619/20
718/19
820/21
919/20
1019/20
1117/18
1220/21
1317/18
1419/20
1520/21
1619/20
1720/21
1820/21
1920/21
2020/21
2120/21
2220/21
2319/20
2420/21
2518/19
2620/21
2720/21
2820/21
2904/05
3020/21
3120/21
3217/18
3320/21
3419/20
3518/19
3618/19
3720/21
3820/21
3919/20
4019/20
4120/21
4219/20
4320/21
4419/20
4518/19
Sheet1
Cell Formulas
RangeFormula
C2C2=INDEX($C$6:$C$45,MATCH(TEXT(AGGREGATE(15,6,--LEFT(C6:C45,2),1),"00")&"*",$C$6:$C$45,0))
C3C3=INDEX($C$6:$C$45,MATCH(TEXT(AGGREGATE(14,6,--LEFT(C6:C45,2),1),"00")&"*",$C$6:$C$45,0))
 
Upvote 0
Try:
Book1
ABC
2Min04/05
3Max20/21
4
5Year
619/20
718/19
820/21
919/20
1019/20
1117/18
1220/21
1317/18
1419/20
1520/21
1619/20
1720/21
1820/21
1920/21
2020/21
2120/21
2220/21
2319/20
2420/21
2518/19
2620/21
2720/21
2820/21
2904/05
3020/21
3120/21
3217/18
3320/21
3419/20
3518/19
3618/19
3720/21
3820/21
3919/20
4019/20
4120/21
4219/20
4320/21
4419/20
4518/19
Sheet1
Cell Formulas
RangeFormula
C2C2=INDEX($C$6:$C$45,MATCH(TEXT(AGGREGATE(15,6,--LEFT(C6:C45,2),1),"00")&"*",$C$6:$C$45,0))
C3C3=INDEX($C$6:$C$45,MATCH(TEXT(AGGREGATE(14,6,--LEFT(C6:C45,2),1),"00")&"*",$C$6:$C$45,0))
Habtest, Thank you for giving a formula solution after I applied it, getting an error #NAME?

I am sorry by the way I forgot to mention range C6 below cells have "text format" may be that reason is causing error... Please could you check it?

Kind Regards
Moti
 
Upvote 0
Hmm... I think the cell format would not impact the result. Is the array entered as in "YY/YY"? Can you upload your result by XL2BB?
 
Upvote 0
Hmm... I think the cell format would not impact the result. Is the array entered as in "YY/YY"? Can you upload your result by XL2BB?
Habtest, I can't upload result by using XL2BB? Because I am using version excel 2000 which is mentioned in #Post1, other reason could be some formula function may be not sure are not compatible with my version

I here copying, and pasting again without the row and header may help. Thank you

Min04/05
Max20/21
Year
19/20
18/19
20/21
19/20
19/20
17/18
20/21
17/18
19/20
20/21
19/20
20/21
20/21
20/21
20/21
20/21
20/21
19/20
20/21
18/19
20/21
20/21
20/21
04/05
20/21
20/21
17/18
20/21
19/20
18/19
18/19
20/21
20/21
19/20
19/20
20/21
19/20
20/21
19/20
18/19

Kind Regards

Moti
 
Upvote 0
Hmm... I think the cell format would not impact the result.
But AGGREGATE is only available since Excel 2010 & OP stated in post #1
I am using Excel 2000


Try this. I think will need confirmation with Ctrl+Shift+Enter, not just enter in your version.

21 06 18.xlsm
BC
1
2Min04/05
3Max20/21
4
5Year
619/20
718/19
820/21
919/20
1019/20
1117/18
1220/21
1317/18
1419/20
1520/21
1619/20
1720/21
1820/21
1920/21
2020/21
2120/21
2220/21
2319/20
2420/21
2518/19
2620/21
2720/21
2820/21
2904/05
3020/21
3120/21
3217/18
3320/21
3419/20
3518/19
3618/19
3720/21
3820/21
3919/20
4019/20
4120/21
4219/20
4320/21
4419/20
4518/19
Min Max Year
Cell Formulas
RangeFormula
C2C2=INDEX(C6:C45,MATCH(TEXT(MIN(LEFT(C6:C45,2)+0),"00\*"),C6:C45,0))
C3C3=INDEX(C6:C45,MATCH(TEXT(MAX(LEFT(C6:C45,2)+0),"00\*"),C6:C45,0))
 
Upvote 0
Solution
But AGGREGATE is only available since Excel 2010 & OP stated in post #1



Try this. I think will need confirmation with Ctrl+Shift+Enter, not just enter in your version.

21 06 18.xlsm
BC
1
2Min04/05
3Max20/21
4
5Year
619/20
718/19
820/21
919/20
1019/20
1117/18
1220/21
1317/18
1419/20
1520/21
1619/20
1720/21
1820/21
1920/21
2020/21
2120/21
2220/21
2319/20
2420/21
2518/19
2620/21
2720/21
2820/21
2904/05
3020/21
3120/21
3217/18
3320/21
3419/20
3518/19
3618/19
3720/21
3820/21
3919/20
4019/20
4120/21
4219/20
4320/21
4419/20
4518/19
Min Max Year
Cell Formulas
RangeFormula
C2C2=INDEX(C6:C45,MATCH(TEXT(MIN(LEFT(C6:C45,2)+0),"00\*"),C6:C45,0))
C3C3=INDEX(C6:C45,MATCH(TEXT(MAX(LEFT(C6:C45,2)+0),"00\*"),C6:C45,0))
Peter_SSs, I tried formula just now and got the results perfect! As request.

I am grateful to you for your kind help. Have a nice time

Regards,
Moti :)
 
Upvote 0
You are welcome. Glad to help. :)

BTW, other ways ..

21 06 18.xlsm
BC
1
2Min04/05
3Max20/21
Min Max Year (2)
Cell Formulas
RangeFormula
C2C2=TEXT(MIN(LEFT(C6:C45,2)+0),"00\/")&TEXT(MIN(LEFT(C6:C45,2)+1),"00")
C3C3=TEXT(MAX(LEFT(C6:C45,2)+0),"00\/")&TEXT(MAX(LEFT(C6:C45,2)+1),"00")


21 06 18.xlsm
BC
1
2Min04/05
3Max20/21
Min Max Year (3)
Cell Formulas
RangeFormula
C2C2=REPLACE(TEXT(MIN(SUBSTITUTE(C6:C45,"/","")+0),"0000"),3,0,"/")
C3C3=REPLACE(TEXT(MAX(SUBSTITUTE(C6:C45,"/","")+0),"0000"),3,0,"/")
 
Last edited:
Upvote 0
You are welcome. Glad to help. :)

BTW, other ways ..

21 06 18.xlsm
BC
1
2Min04/05
3Max20/21
Min Max Year (2)
Cell Formulas
RangeFormula
C2C2=TEXT(MIN(LEFT(C6:C45,2)+0),"00\/")&TEXT(MIN(LEFT(C6:C45,2)+1),"00")
C3C3=TEXT(MAX(LEFT(C6:C45,2)+0),"00\/")&TEXT(MAX(LEFT(C6:C45,2)+1),"00")


21 06 18.xlsm
BC
1
2Min04/05
3Max20/21
Min Max Year (3)
Cell Formulas
RangeFormula
C2C2=REPLACE(TEXT(MIN(SUBSTITUTE(C6:C45,"/","")+0),"0000"),3,0,"/")
C3C3=REPLACE(TEXT(MAX(SUBSTITUTE(C6:C45,"/","")+0),"0000"),3,0,"/")
Peter_SSs, I tried your latest formulas "TEXT", "REPLAC" and previous "INDEX", one all worked like magic, I am surprised to see so many functions are there to write and get same results.

I appreciate your help and wish you a best weekend ?

Regards,
Moti :)
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

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