Formula to isolate a numeral in a string

  • Thread starter Thread starter Merritt
  • Start date Start date
M

Merritt

I am trying to write a formula to pull the number 6 out of
a cell containing the following imported data:
Option Buttons 43 6
(Note, there are numerous spaces after the numeral 6!)

The formula I have been using in the past is:
=IF(ISBLANK('PASTE Leader'!A2),"",(MID('PASTE Leader'!
A2,19,2)))

This worked fine until Homestead, our website building and
hosting company, changed the format of the data form such
that the imported data now includes the extra spaces at
the end.

What can I add to my formula to isolate the number (6 in
this case) without the extra spaces. My subsequest
formulas don't like the spaces.

Much Tkx.
 
Merritt

Try
=IF(ISBLANK('PASTE Leader'!A2),"",(MID(trim('PASTE Leader'! A2),19,2)))
The trim function strips out all spare blank spaces
Regards
Philip
 
Back
Top