Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Partial Text Color Change in Cell | Excel Discussion (Misc queries) | |||
Copy text cell & change text color conditionally | Excel Programming | |||
Change color of specific text within a cell? | Excel Programming | |||
Change text color in a cell automatically | Excel Discussion (Misc queries) | |||
Cell text color change | Excel Discussion (Misc queries) |