Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Move text that is a specific color to a different cell

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Move text that is a specific color to a different cell

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.
--
Gary's Student


"Alison84" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Move text that is a specific color to a different cell

Wow it works!!!!!

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

Alison84 :)

"Gary''s Student" wrote:

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.
--
Gary's Student


"Alison84" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Move text that is a specific color to a different cell

You are very welcome.

If you know the tricks, you can manipulate text as easily in Excel as in Word.
--
Gary''s Student


"Alison84" wrote:

Wow it works!!!!!

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

Alison84 :)

"Gary''s Student" wrote:

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.
--
Gary's Student


"Alison84" wrote:

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

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
Cell Capacity - text i2meek Excel Discussion (Misc queries) 4 March 13th 06 12:06 AM
need to Copy or Move to active cell from specified range kaream Excel Discussion (Misc queries) 2 December 14th 05 08:12 AM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM
Counting specific text in a cell Steve Excel Worksheet Functions 7 January 26th 05 05:51 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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