Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / November 2006

Tip: Looking for answers? Try searching our database.

Move text that is a specific color to a different cell

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alison84 - 15 Nov 2006 11:50 GMT
Hi,
I have a worksheet that has groups of text in the same cell. I have used
colors to group the text together. I now want to seperate the different
groups (colors) of text to a different cell depending on the color.

Is this possible? Any help would be great.

Thanks
Gary''s Student - 15 Nov 2006 14:54 GMT
In cell A1 enter:
Now is the time for all good men to come to the aid of their party.

Then color good men red.

Then enter and run this macro:

Sub red_picker()
Dim r1 As Range, r2 As Range
Dim s1 As String, s2 As String

Set r1 = Range("A1")
Set r2 = Range("A2")
s1 = r1.Value
l = Len(s1)

For i = 1 To l
   If r1.Characters(i, 1).Font.ColorIndex = 3 Then
       s2 = s2 & Mid(s1, i, 1)
   End If
Next

r2.Value = s2
End Sub

This is just a sample of the technique, adapt it as you choose.
Signature

Gary's Student

> Hi,
> I have a worksheet that has groups of text in the same cell. I have used
[quoted text clipped - 4 lines]
>
> Thanks
Alison84 - 15 Nov 2006 15:36 GMT
Wow it works!!!!!

Thanks you so much - this will make my work much much easier now.

Alison84 :)

> In cell A1 enter:
> Now is the time for all good men to come to the aid of their party.
[quoted text clipped - 31 lines]
> >
> > Thanks
Gary''s Student - 15 Nov 2006 16:12 GMT
You are very welcome.

If you know the tricks, you can manipulate text as easily in Excel as in Word.
Signature

Gary''s Student

> Wow it works!!!!!
>
[quoted text clipped - 37 lines]
> > >
> > > Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.