Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Add text to cells highlighted in rose

Can someone help with a variation of an earlier question I had? I want to add
text that says "pre-LSA" to every cell in G2 to G477 highlighted in rose
color.
I know part of what the Visual Basic code might be but not all of it.

Thanks!


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Add text to cells highlighted in rose

Sub by_any_other_name()
For Each r In Range("G2:G477")
If r.Interior.ColorIndex = 38 Then
r.Value = r.Value & "pre-LSA"
End If
Next
End Sub
--
Gary''s Student - gsnu200759


"Studebaker" wrote:

Can someone help with a variation of an earlier question I had? I want to add
text that says "pre-LSA" to every cell in G2 to G477 highlighted in rose
color.
I know part of what the Visual Basic code might be but not all of it.

Thanks!


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Add text to cells highlighted in rose

Gary"s Student,

It works! but I've just added text in some of those rose color cells.
How can I have a period and a space after the existing text and then have
"pre-LSA"
Ex: 80% cell. pre-LSA

I appreciate your help.

"Gary''s Student" wrote:

Sub by_any_other_name()
For Each r In Range("G2:G477")
If r.Interior.ColorIndex = 38 Then
r.Value = r.Value & "pre-LSA"
End If
Next
End Sub
--
Gary''s Student - gsnu200759


"Studebaker" wrote:

Can someone help with a variation of an earlier question I had? I want to add
text that says "pre-LSA" to every cell in G2 to G477 highlighted in rose
color.
I know part of what the Visual Basic code might be but not all of it.

Thanks!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 57
Default Add text to cells highlighted in rose

Ignore my last question about how to add a space and period before "pre-LSA".
I wasn't thinking...I figured it out.
For anyone who wants to know:

r.Value = r.Value & ". pre-LSA"

Thanks. I'm trying to learn Visual Basic and you and the others are helping
a lot.



"Gary''s Student" wrote:

Sub by_any_other_name()
For Each r In Range("G2:G477")
If r.Interior.ColorIndex = 38 Then
r.Value = r.Value & "pre-LSA"
End If
Next
End Sub
--
Gary''s Student - gsnu200759


"Studebaker" wrote:

Can someone help with a variation of an earlier question I had? I want to add
text that says "pre-LSA" to every cell in G2 to G477 highlighted in rose
color.
I know part of what the Visual Basic code might be but not all of it.

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
HELP!!! I am unable to see colored text or highlighted cells ... Frustrated beyond words Excel Discussion (Misc queries) 1 April 3rd 07 10:21 PM
What can be done with highlighted cells? jimplace Excel Discussion (Misc queries) 1 December 27th 06 12:27 AM
Highlighted Text And/Or Cells M.A.Tyler Excel Discussion (Misc queries) 3 February 5th 06 02:42 AM
highlighted cells Caveman Excel Discussion (Misc queries) 1 December 12th 05 08:05 PM
Why aren't my cells highlighted when I select multiple cells? TChristian Setting up and Configuration of Excel 0 January 26th 05 10:23 PM


All times are GMT +1. The time now is 06:55 AM.

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"