"MAX" not returning a value determined by a series of formula

andymalan

Board Regular
Joined
Feb 22, 2017
Messages
85
Greetings everyone. I am trying to extract values from text and then returning the result as a number and not succeeding.
e.g. text in B3: Floor Unit w/2 doors 900mm. I need the 900mm to be returned as a number, 900.
So far I have indeed managed to extract the 900 to a cell by using the "substitute" formula, but when I apply the "MAX" formula, it returns a zero.
Formula in EE3 IF(ISNUMBER(SEARCH($EA$1,$B3)), RIGHT($B3, 6),"") returns 900mm
Formula in EC3 SUBSTITUTE(EE3,"mm"," ") returns 900
Formula in IT3 MAX(DW3,EC3,EI3,EO3,EU3,FA3,FG3) returns 0

your help will be greatly appreciated.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
Hi,

Don't know what EA1, or B3 is, but try adapting this into your current formulas:

Book3.xlsx
BCD
3Floor Unit w/2 doors 900mm 900mm900
Sheet861
Cell Formulas
RangeFormula
C3C3=RIGHT(B3,6)
D3D3=SUBSTITUTE(C3,"mm","")+0


The important part is in my sample D3, notice the +0
 
Solution

andymalan

Board Regular
Joined
Feb 22, 2017
Messages
85
Hi,

Don't know what EA1, or B3 is, but try adapting this into your current formulas:

Book3.xlsx
BCD
3Floor Unit w/2 doors 900mm 900mm900
Sheet861
Cell Formulas
RangeFormula
C3C3=RIGHT(B3,6)
D3D3=SUBSTITUTE(C3,"mm","")+0


The important part is in my sample D3, notice the +0
Dear jtakw
thank you so very much.
you have honestly helped me a great deal.
 

andymalan

Board Regular
Joined
Feb 22, 2017
Messages
85
Hi,

Don't know what EA1, or B3 is, but try adapting this into your current formulas:

Book3.xlsx
BCD
3Floor Unit w/2 doors 900mm 900mm900
Sheet861
Cell Formulas
RangeFormula
C3C3=RIGHT(B3,6)
D3D3=SUBSTITUTE(C3,"mm","")+0


The important part is in my sample D3, notice the +0
Dear jtakw, when formula in C3 returns nothing, I get a #VALUE! error, what can I do with that?
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

It would mean =RIGHT(B3,6), and then =SUBSTITUTE(C3,"mm","")+0 is Not a number
What do you want to do when that happens?
Return "" ( Blank ), or something else....?
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
I think, you should show a few samples representative of all possible variations of the text strings you're trying to extract the number, if any, from B3
and explain under what circumstances to extract, (e.g. your requirement(s) in EA1)
and what possible Text(s) needs to be eliminated from the extraction (e.g. "mm", "inch", "feet", etc.)
I can probably get the extraction done all in one shot, (may be), but you need to give samples and requirements.
 

andymalan

Board Regular
Joined
Feb 22, 2017
Messages
85

ADVERTISEMENT

It would mean =RIGHT(B3,6), and then =SUBSTITUTE(C3,"mm","")+0 is Not a number
What do you want to do when that happens?
Return "" ( Blank ), or something else....?
I would then want it to return a blank
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
You're welcome, thanks for the feedback.

Let me know if you want further help with the number extraction from your text string(s)
Refer to my post #6.
 

Watch MrExcel Video

Forum statistics

Threads
1,130,317
Messages
5,641,486
Members
417,211
Latest member
loadius

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