Substitute for min, max,small,large..

kralimarko

Board Regular
Joined
Dec 8, 2008
Messages
50
I have some arrays, and i want to get the max value, but in some arrays instead of numbers i have text like BA12, BA14 and this formulas returns errors or 1. So i want formula that works for numbers and text values, that returns biggest value ,(1 value in descending order for text), thanks in advance.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
I have some arrays, and i want to get the max value, but in some arrays instead of numbers i have text like BA12, BA14 and this formulas returns errors or 1. So i want formula that works for numbers and text values, that returns biggest value ,(1 value in descending order for text), thanks in advance.

Could you post small samples along with the desired results?
 

kralimarko

Board Regular
Joined
Dec 8, 2008
Messages
50
Col Col Col Col
I j k q
100938 200345 "empty" =MAXA(I2:K2;1), (200345)
100950 "empty" 200463 200463
"empty" BA12 BA14 BA14



In col.Q i need the formula that returns the results.(ex. 200345,200463,BA14)
 

shift-del

Well-known Member
Joined
Aug 28, 2009
Messages
584
Office Version
  1. 365
Platform
  1. Windows
Hi

If there is only "BA" before the number:
Code:
{=MAX(SUBSTITUTE(I1:K1&0,"BA","")*1)/10}
Array formula!
Do not enter the curly brackets {}.
Enter the formular with CTRL-SHIFT-ENTER instead of just ENTER.
 
Last edited:

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,210
Col Col Col Col
I j k q
100938 200345 "empty" =MAXA(I2:K2;1), (200345)
100950 "empty" 200463 200463
"empty" BA12 BA14 BA14



In col.Q i need the formula that returns the results.(ex. 200345,200463,BA14)

Without a test for text or numeric data...

Q1, control+shift+enter, not just enter, and copy down:

=INDEX(I1:K1,MATCH(MAX(COUNTIF(I1:K1,"<="&I1:K1)),COUNTIF(I1:K1,"<="&I1:K1),0))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,149
Messages
5,835,683
Members
430,376
Latest member
eeehhhyyy

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
Top