LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default Splitting cells

On Wed, 21 May 2008 12:36:46 -0700, Bill
wrote:

I have data like the following.

6.00 x 12.00 x 24.00 CRS

I would like to split out the last part (CRS) into another cell. There is
always a space before the data to split, but the rest may or may not have
spaces. Basically I need to go to the end of the cell and then back to the
space and split.

Thanks
Bill



Here are two ways to return the last "word"

==================================================
Function lastword1(str As String) As String
lastword1 = Mid(str, InStrRev(str, " ") + 1)
End Function

Function lastword2(str As String) As String
lastword2 = Split(str)(UBound(Split(str)))
End Function
==========================================
--ron


 
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
splitting cells dleo New Users to Excel 2 April 9th 09 04:28 PM
Splitting cells Albee Excel Worksheet Functions 2 March 2nd 09 05:11 PM
Splitting cells Splitting Cells Excel Discussion (Misc queries) 3 October 23rd 08 08:25 AM
Splitting cells? mbing916 Excel Discussion (Misc queries) 1 May 2nd 07 10:44 PM
splitting cells Nicole Excel Worksheet Functions 2 June 2nd 06 05:13 PM


All times are GMT +1. The time now is 02:05 PM.

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

About Us

"It's about Microsoft Excel"