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

andymalan

Board Regular
Joined
Feb 22, 2017
Messages
128
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
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

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
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
 
Upvote 0
Solution
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.
 
Upvote 0
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?
 
Upvote 0
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....?
 
Upvote 0
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.
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,245
Members
448,952
Latest member
kjurney

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