#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default STRIP CHARACTERS

On Sat, 15 Dec 2007 23:34:36 -0500, "Rick Rothstein \(MVP - VB\)"
wrote:

Here's another VBA approach:

==============================
Option Explicit
Sub splitatX()
Dim c As Range
Dim temp
Dim i As Long
For Each c In Selection
temp = Split(LCase(c.Text), "x")
For i = 0 To UBound(temp)
c.Offset(0, i + 1).Value = temp(i)
Next i
Next c
End Sub
===================================


You can eliminate the LCase function call for the first statement in your
For-Next block by using the Split function's "Compare" argument...

temp = Split(c.Text, "x", , vbTextCompare)

Rick


Thanks for that pointer.
--ron
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
Strip text before character bell23 Excel Worksheet Functions 4 October 29th 05 10:05 AM
Strip Out Time HeartSA New Users to Excel 2 October 13th 05 08:39 PM
Strip carriage return, add row adin Excel Worksheet Functions 18 April 26th 05 10:03 AM
TAB STRIP icebreaker914 Excel Discussion (Misc queries) 1 April 16th 05 01:24 PM
tab strip icebreaker914 New Users to Excel 1 April 16th 05 01:24 PM


All times are GMT +1. The time now is 06:30 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"