![]() |
Fill Cell with Red
I have a spreadsheet that I need to fill the interior color of the row red if
column f contains the text red. I need the data in each row to turn red if f is red for columns a through e and g through m. Is there an easy way to do this other than sorting/filtering. Is there some way to do this with VBA? Any help is appreciated. |
Fill Cell with Red
You can use Conditional Formatting to set the background color or font color
based upon the value in another cell. This is the Formula Is option. See: http://www.contextures.com/xlCondFormat02.html -- Gary's Student gsnu200708 "CB" wrote: I have a spreadsheet that I need to fill the interior color of the row red if column f contains the text red. I need the data in each row to turn red if f is red for columns a through e and g through m. Is there an easy way to do this other than sorting/filtering. Is there some way to do this with VBA? Any help is appreciated. |
Fill Cell with Red
Select the first cell you want treated this way
Go to Format-Conditional Formatting Select "Formula is" enter =$f1="red" (change the 1 to whatever row you have selected) click n the Format button Go to the Patterns tab Pick your color OK your way back to the spreadsheet Copy the current cell Select all the cells you want to format this way Use Edit-Paste Special-Formats to copy just the formatting "CB" wrote: I have a spreadsheet that I need to fill the interior color of the row red if column f contains the text red. I need the data in each row to turn red if f is red for columns a through e and g through m. Is there an easy way to do this other than sorting/filtering. Is there some way to do this with VBA? Any help is appreciated. |
Fill Cell with Red
I have already used the conditional formatting option for another purpose. I
need to use either a function or code for these cells. Any ideas? "Duke Carey" wrote: Select the first cell you want treated this way Go to Format-Conditional Formatting Select "Formula is" enter =$f1="red" (change the 1 to whatever row you have selected) click n the Format button Go to the Patterns tab Pick your color OK your way back to the spreadsheet Copy the current cell Select all the cells you want to format this way Use Edit-Paste Special-Formats to copy just the formatting "CB" wrote: I have a spreadsheet that I need to fill the interior color of the row red if column f contains the text red. I need the data in each row to turn red if f is red for columns a through e and g through m. Is there an easy way to do this other than sorting/filtering. Is there some way to do this with VBA? Any help is appreciated. |
Fill Cell with Red
O.K. then:
Sub cb() n = Cells(Rows.Count, "F").End(xlUp).Row For i = 1 To n If Cells(i, "F").Value = "red" Then Range("A" & i & ":E" & i).Interior.ColorIndex = 3 Range("G" & i & ":M" & i).Interior.ColorIndex = 3 End If Next End Sub -- Gary''s Student gsnu200708 "CB" wrote: I have already used the conditional formatting option for another purpose. I need to use either a function or code for these cells. Any ideas? "Duke Carey" wrote: Select the first cell you want treated this way Go to Format-Conditional Formatting Select "Formula is" enter =$f1="red" (change the 1 to whatever row you have selected) click n the Format button Go to the Patterns tab Pick your color OK your way back to the spreadsheet Copy the current cell Select all the cells you want to format this way Use Edit-Paste Special-Formats to copy just the formatting "CB" wrote: I have a spreadsheet that I need to fill the interior color of the row red if column f contains the text red. I need the data in each row to turn red if f is red for columns a through e and g through m. Is there an easy way to do this other than sorting/filtering. Is there some way to do this with VBA? Any help is appreciated. |
Fill Cell with Red
Have you used all 3 of the permitted conditional formatting stages?
-- David Biddulph "CB" wrote in message ... I have already used the conditional formatting option for another purpose. I need to use either a function or code for these cells. Any ideas? "Duke Carey" wrote: Select the first cell you want treated this way Go to Format-Conditional Formatting Select "Formula is" enter =$f1="red" (change the 1 to whatever row you have selected) click n the Format button Go to the Patterns tab Pick your color OK your way back to the spreadsheet Copy the current cell Select all the cells you want to format this way Use Edit-Paste Special-Formats to copy just the formatting "CB" wrote: I have a spreadsheet that I need to fill the interior color of the row red if column f contains the text red. I need the data in each row to turn red if f is red for columns a through e and g through m. Is there an easy way to do this other than sorting/filtering. Is there some way to do this with VBA? Any help is appreciated. |
All times are GMT +1. The time now is 10:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com