Stacking MAX and RIGHT and LEN functions

Yamezz

Active Member
Joined
Nov 22, 2006
Messages
367
Office Version
  1. 2019
I have data that contains order numbers preceded by "#", such as #1985, #1986, #1987 etc. I want to find the maximum and minimum order values in a selection, but simply using =MAX(C2:C32) returns "0".
I can use =RIGHT(C2,LEN(C2)-1) to reduce #1985 to simply 1985, but I don't know how to find the maximum without using a helper column. Is there a way?
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
How about
Excel Formula:
=MAX(IFERROR(--MID(C2:C100,2,100),0))
This may need to be confirmed with Ctrl Shift Enter.
 
Upvote 0
In that case can you post some sample data using the XL2BB add-in, as it works for me
Fluff.xlsm
CD
1
2#19851998
3#1986
4#1987
5#1998
6#1989
7#1990
8#1991
9
Data
Cell Formulas
RangeFormula
D2D2=MAX(IFERROR(--MID(C2:C100,2,100),0))
 
Upvote 0
Solution
Another option with just enter,

=AGGREGATE(14,6,--MID(C2:C100,2,10),1)
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
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