Formula to get MAx value if the Columns comes with a string character before the value

drom

Well-known Member
Joined
Mar 20, 2005
Messages
528
Office Version
  1. 2021
  2. 2019
  3. 2016
  4. 2013
  5. 2011
  6. 2010
  7. 2007
Hi and thanks in advance"


Formula to get MAx value if the Columns comes with a string character before the value
Please I do not want to use more columns, (Mandatory)

I have in a Column in a Table with the following values:

A22
A56
A89
A102
A1
A9
A21
I do know how to extract just the values in other column and get the max value of this new column.

But I do not want to use any other Column

So If my Values are in Column Z5:Z???


I woul like to create a Formula in Z2 to give me:
102 (In this eg, 102 will be the max value)

ps: the column Z in my Table, always comes with a Character plus a value on it
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Assuming you will only have 1 alpha at the start of the string
How about

Excel 2013/2016
Z
3102
4
5A22
6A56
7A89
8A102
9A1
10A9
11A21
Sheet2
Cell Formulas
RangeFormula
Z3{=MAX(RIGHT(Z5:Z11,LEN(Z5:Z11)-1)*1)}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Last edited:
Upvote 0
HI and Thanks again!

The Formula works Fine, But I did not say, (My Mistake) sometimes the cells are coming with no Value just the Character or Empty so In those cases I get Error (#Value!) within the Array

{5;#Value!:1;45;#Value!;#Value!}
ANy Help?
 
Last edited:
Upvote 0
How about

Excel 2013/2016
Z
3102
4
5A22
6A56
7
8A102
9A1
10A
11A21
Sheet2
Cell Formulas
RangeFormula
Z3{=MAX(IF((Z5:Z11<>"")*(ISNUMBER(RIGHT(Z5:Z11,LEN(Z5:Z11)-1)*1)),RIGHT(Z5:Z11,LEN(Z5:Z11)-1)*1))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
How about

Excel 2013/2016
Z
3102
4
5A22
6A56
7
8A102
9A1
10A
11A21
Sheet2
Cell Formulas
RangeFormula
Z3{=MAX(IF((Z5:Z11<>"")*(ISNUMBER(RIGHT(Z5:Z11,LEN(Z5:Z11)-1)*1)),RIGHT(Z5:Z11,LEN(Z5:Z11)-1)*1))}
Press CTRL+SHIFT+ENTER to enter array formulas.
Assuming your setup, the following array-entered** formula also seems to work...

=MAX(IF(ISNUMBER(Z5:Z11),Z5:Z11,0+(0&MID(Z5:Z11,2,99))))

**Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself

Note: I assume that the maximum length of an entry in a cell is 99 characters.
 
Upvote 0
Another...

Regular formula
=AGGREGATE(14,6,--RIGHT(Z3:Z11,LEN(Z3:Z11)-1*NOT(ISNUMBER(--Z3:Z11))),1)

M.
 
Upvote 0

Forum statistics

Threads
1,215,049
Messages
6,122,864
Members
449,097
Latest member
dbomb1414

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