Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Help finding the last space in a cell

I need to isolate all the characters in a cell prior to the last
space.
Can anyone tell me how to find the the posistion of the last space in
the cell?

This is an example of my data:

CompanyA
Company B

CompC


The output I want from my formula is:

CompanyA
Company B
CompC

I'm trying use a LEFT formula knowing the position of the last space;
but other suggestions are welcome.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Help finding the last space in a cell

Hi,

You can use the following array formula

=LEFT(A1,MAX(IF(MID(A1,ROW(A1:A99),1)=" ",ROW(A1:A99),"")))

This assumes that the entry is in B1. To enter an array press
Shift+Ctrl+Enter
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


" wrote:

I need to isolate all the characters in a cell prior to the last
space.
Can anyone tell me how to find the the posistion of the last space in
the cell?

This is an example of my data:

CompanyA
Company B

CompC


The output I want from my formula is:

CompanyA
Company B
CompC

I'm trying use a LEFT formula knowing the position of the last space;
but other suggestions are welcome.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding (and eliminating) hidden "space" character smartgal Excel Discussion (Misc queries) 8 October 31st 08 03:45 AM
space before cell contents BNT1 via OfficeKB.com Excel Worksheet Functions 2 February 22nd 08 02:30 PM
space before cell contents BNT1 via OfficeKB.com Excel Worksheet Functions 0 February 22nd 08 02:07 PM
How to combind to cell with a <space Roger Excel Worksheet Functions 1 February 27th 07 11:14 PM
space in cell wood1e Excel Discussion (Misc queries) 3 August 19th 06 09:05 AM


All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"