ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   LEFT function (https://www.excelbanter.com/excel-discussion-misc-queries/92093-left-function.html)

Pat Dools

LEFT function
 
Hello,

What is the formula for obtaining the left-most characters in a phrase up to
the first blank space in that phrase? For example, for the phrase, '01
Summary', or '233 Summary', I only would only want to return '01' or '233',
respectively. I need to know how to read up to the first blank space and
then get the characters to the left of that blank space.

Thanks.
--
Pat Dools

Biff

LEFT function
 
Hi!

Try this:

This accounts for cells that may not contain a space and in those cases will
leave the formula cell blank instead of returning an error:

=IF(ISNUMBER(FIND(" ",A1)),LEFT(A1,FIND(" ",A1)-1),"")

If the data you want to apply this to will always contain a space then just
this will work:

=LEFT(A1,FIND(" ",A1)-1)

Biff

"Pat Dools" wrote in message
...
Hello,

What is the formula for obtaining the left-most characters in a phrase up
to
the first blank space in that phrase? For example, for the phrase, '01
Summary', or '233 Summary', I only would only want to return '01' or
'233',
respectively. I need to know how to read up to the first blank space and
then get the characters to the left of that blank space.

Thanks.
--
Pat Dools





All times are GMT +1. The time now is 12:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com