Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm hoping that something like this can be done: if any email address
in a worksheet has a certain text string in it, in this case ", what would the conditional formatting code be that will then colour that row yellow, if this is indeed possible? The rows go from 2 to 15, if that info is needed, i.e., A2 to A15, B2 to B15, etc. (or if necessary, if it's easier to just code the entire row, that would be acceptable, too, rather than the area of row that is visible in the sheet). What this would do is to signal records of people that are inside the organization vs other govt departments. Thanks much. Appreciate the help. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe you can use this:
With Range(x) .FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, """ .FormatConditions(1).Interior.Color = vbYellow End With But this will only color the given cell To color the entire row adding this should work (maybe put it under the Worksheet.Change event): If Range(x).Interior.Color=vbYellow then rows(Range(x).Row).Interior.Color=vbYellow End If -----Original Message----- I'm hoping that something like this can be done: if any email address in a worksheet has a certain text string in it, in this case ", what would the conditional formatting code be that will then colour that row yellow, if this is indeed possible? The rows go from 2 to 15, if that info is needed, i.e., A2 to A15, B2 to B15, etc. (or if necessary, if it's easier to just code the entire row, that would be acceptable, too, rather than the area of row that is visible in the sheet). What this would do is to signal records of people that are inside the organization vs other govt departments. Thanks much. Appreciate the help. . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "StargateFan" wrote in message ... I'm hoping that something like this can be done: if any email address in a worksheet has a certain text string in it, in this case ", what would the conditional formatting code be that will then colour that row yellow, if this is indeed possible? The rows go from 2 to 15, if that info is needed, i.e., A2 to A15, B2 to B15, etc. (or if necessary, if it's easier to just code the entire row, that would be acceptable, too, rather than the area of row that is visible in the sheet). is there an email in only one column per row? if so then you just have to select the cells in row 1, go to conditional formating . change the condition to Formula=, and enter (assuming the email appears in column A) ",$A1) and set the formating to yellow background then select the cells, copy. select all the cells below that row and paste special 'formats' If the emails appear more than once per row then it's a little more complicated, so post back in that case. Iain King |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If the color is set with Conditional formatting, then your suggestion of
If Range(x).Interior.Color=vbYellow then rows(Range(x).Row).Interior.Color=vbYellow End If will not work as you can not query a cell for a color being produced by conditional formatting. -- Regards, Tom Ogilvy wrote in message ... Maybe you can use this: With Range(x) .FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, """ .FormatConditions(1).Interior.Color = vbYellow End With But this will only color the given cell To color the entire row adding this should work (maybe put it under the Worksheet.Change event): If Range(x).Interior.Color=vbYellow then rows(Range(x).Row).Interior.Color=vbYellow End If -----Original Message----- I'm hoping that something like this can be done: if any email address in a worksheet has a certain text string in it, in this case ", what would the conditional formatting code be that will then colour that row yellow, if this is indeed possible? The rows go from 2 to 15, if that info is needed, i.e., A2 to A15, B2 to B15, etc. (or if necessary, if it's easier to just code the entire row, that would be acceptable, too, rather than the area of row that is visible in the sheet). What this would do is to signal records of people that are inside the organization vs other govt departments. Thanks much. Appreciate the help. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Text colour keeps changing to grey | Excel Discussion (Misc queries) | |||
Changing background colour when changing data in a cell | Excel Discussion (Misc queries) | |||
changing numbers in a text string in a new cell | Excel Discussion (Misc queries) | |||
Changing the colour of text | Excel Discussion (Misc queries) | |||
Changing colour of text in cell | Excel Programming |