find least non-zero number from a range incl. text and numbers

Goyal

New Member
Joined
Jun 17, 2021
Messages
7
Office Version
  1. 365
Platform
  1. MacOS
Requirement: identify cell value starting with number excluding 0 from a range of cells containing text or blanks.

I could write a query when all cells contain numeric value.
1623915243394.png


INDEX(A1:C1,0,MATCH(MIN(IF(VALUE(LEFT(A1:C1))<>0,VALUE(LEFT(A1:C1)))),VALUE(LEFT(A1:C1)),0))

But this doesn't work when cells include text or blanks. in the below example, I am expecting "1-Not Started" as the output ...
1623915257276.png


Many thx for your support.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Welcome to the MrExcel board!
identify cell value starting with number excluding 0 ..... I am expecting "1-Not Started" as the output ..
Why are you expecting "1-Not Started" as opposed to "3- In Progress" or "0-N/A" ?

BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.
 
Upvote 0
Why are you expecting "1-Not Started" as opposed to "3- In Progress" or "0-N/A" ?
On re-reading, I think that I have answered my own questions. Try this (assuming that you have the LET function).

21 06 17.xlsm
ABCDEFG
10-N/Acm3-In Progressprime1- Not Started1- Not Started
Detect Number
Cell Formulas
RangeFormula
G1G1=LET(fltr,FILTER(A1:E1,(ISNUMBER(LEFT(A1:E1,1)+0))*(LEFT(A1:E1,1)<>"0")),INDEX(SORTBY(fltr,LEFT(fltr,FIND("-",fltr&"-")-1)+0),1))
 
Upvote 0
Solution
I think this array-entered** formula will also work...
Excel Formula:
=MIN(IF((LEFT(A1:E1)<>"0")*ISNUMBER(-LEFT(A1:E1)),0+LEFT(A1:E1,FIND("-",A1:E1&"-")-1),FALSE))
**Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself
 
Upvote 0
I think this array-entered** formula will also work...
Excel Formula:
=MIN(IF((LEFT(A1:E1)<>"0")*ISNUMBER(-LEFT(A1:E1)),0+LEFT(A1:E1,FIND("-",A1:E1&"-")-1),FALSE))
**Commit this formula using CTRL+SHIFT+ENTER and not just Enter by itself
Hi Rick
The OP has 365 so no need for C+S+E entry. However, the formula only returns that leading number (1 in this case), not ...
I am expecting "1-Not Started" as the output
.. but could perhaps be modified to
Excel Formula:
=INDEX(A1:E1,MATCH(MIN(IF((LEFT(A1:E1)<>"0")*ISNUMBER(-LEFT(A1:E1)),0+LEFT(A1:E1,FIND("-",A1:E1&"-")-1),FALSE))&"-*",A1:E1,0))
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,893
Messages
6,122,121
Members
449,066
Latest member
Andyg666

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