Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Grabbing text from just part of a cell


Hi all,

I have sheets that come in that include a cell that says, for instance
'Subject no.: 5'. How would I grab just the '5' part of that cell?

Help appreciated, thanks

--
Mary
-----------------------------------------------------------------------
Mary T's Profile: http://www.excelforum.com/member.php...fo&userid=3015
View this thread: http://www.excelforum.com/showthread.php?threadid=49834

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Grabbing text from just part of a cell

The following function will grab whatever follows the colon space:

Function SubjectNum(InitialValue As String) As String

Dim l As Long

'Find the location of the colon and add 1 for the space
l = InStr(1, InitialValue, ":") + 1

SubjectNum = Right$(InitialValue, Len(InitialValue) - l)

End Function

--
Kevin Backmann


"Mary T" wrote:


Hi all,

I have sheets that come in that include a cell that says, for instance,
'Subject no.: 5'. How would I grab just the '5' part of that cell?

Help appreciated, thanks!


--
Mary T
------------------------------------------------------------------------
Mary T's Profile: http://www.excelforum.com/member.php...o&userid=30151
View this thread: http://www.excelforum.com/showthread...hreadid=498349


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Grabbing text from just part of a cell


That worked great, thanks!


--
Mary T
------------------------------------------------------------------------
Mary T's Profile: http://www.excelforum.com/member.php...o&userid=30151
View this thread: http://www.excelforum.com/showthread...hreadid=498349

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
IF cell contains part of text Supe Excel Worksheet Functions 4 May 2nd 23 07:46 PM
copy selected part number of text from one cell into another cell orewa Excel Discussion (Misc queries) 1 April 11th 08 01:30 PM
Get part of text in a Cell Marcha Excel Discussion (Misc queries) 10 March 11th 08 05:04 PM
find text in cell and replace it with part of the text in that ce. jules Excel Discussion (Misc queries) 3 May 3rd 07 10:18 AM
USE PART OF TEXT FROM ONE CELL IN ANOTHER Bob Excel Discussion (Misc queries) 4 December 19th 06 12:23 AM


All times are GMT +1. The time now is 08:24 PM.

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"