Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Change color of moved cell text

Hi, I'm using this code to move any text from Col K to Col H. I want only
the text that is moved to Col H to be in red text, but when I use code to
accomplish this, the entire column text is red. Any idea on how I could just
have the text that is moved be red? Thanks

Sub MovePayments()

' Move payments from column K (11) to column H (8)

Application.DisplayAlerts = False

Set rng = Columns(11).SpecialCells(xlConstants)
For Each cell In rng
Cells(cell.Row, "H").Value = cell.Value
Next
rng.ClearContents


End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Change color of moved cell text

I had success by doing it with your original code adding
Cells(cell.Row, "H").Font.ColorIndex = 3
in the for next loop and going into the options dialog box selecting
edit and disabling the extend lists and formats and formulas.



ploddinggaltn wrote:
Hi, I'm using this code to move any text from Col K to Col H. I want only
the text that is moved to Col H to be in red text, but when I use code to
accomplish this, the entire column text is red. Any idea on how I could just
have the text that is moved be red? Thanks

Sub MovePayments()

' Move payments from column K (11) to column H (8)

Application.DisplayAlerts = False

Set rng = Columns(11).SpecialCells(xlConstants)
For Each cell In rng
Cells(cell.Row, "H").Value = cell.Value
Next
rng.ClearContents


End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Change color of moved cell text

Sub MovePayments()
' Move payments from column K (11) to column H (8)

Application.DisplayAlerts = False

Set rng = Columns(11).SpecialCells(xlConstants)
For Each cell In rng
Cells(cell.Row, "H").Value = cell.Value
Next
rng.ClearContents
rng.Offset(0, -2).Interior.ColorIndex = 3

End Sub


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"ploddinggaltn" wrote in message
...
Hi, I'm using this code to move any text from Col K to Col H. I want only
the text that is moved to Col H to be in red text, but when I use code to
accomplish this, the entire column text is red. Any idea on how I could

just
have the text that is moved be red? Thanks

Sub MovePayments()

' Move payments from column K (11) to column H (8)

Application.DisplayAlerts = False

Set rng = Columns(11).SpecialCells(xlConstants)
For Each cell In rng
Cells(cell.Row, "H").Value = cell.Value
Next
rng.ClearContents


End Sub



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
Partial Text Color Change in Cell Rochelles Excel Discussion (Misc queries) 4 December 23rd 08 11:11 PM
Copy text cell & change text color conditionally manxman Excel Programming 2 August 31st 06 08:18 PM
Change color of specific text within a cell? [email protected] Excel Programming 1 July 13th 06 05:28 PM
Change text color in a cell automatically Dajana Excel Discussion (Misc queries) 0 November 8th 05 12:31 AM
Cell text color change Steffen Excel Discussion (Misc queries) 1 February 23rd 05 10:31 PM


All times are GMT +1. The time now is 12:10 AM.

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"