Apr 10, 2007 #1 micang Technical User Joined Aug 9, 2006 Messages 626 Location US Hi All, Excel 2003: I have a list of text in a column. Some of these text values are in red colour. I would like to identify these cells that have text in red, by putting a "1" in the adjacent cell. Is this possible? Many thanks Michael
Hi All, Excel 2003: I have a list of text in a column. Some of these text values are in red colour. I would like to identify these cells that have text in red, by putting a "1" in the adjacent cell. Is this possible? Many thanks Michael
Apr 10, 2007 #2 royalcheese Technical User Joined Dec 5, 2005 Messages 111 Location GB Very You need a loop to go through your list and where the returned color is red then make the next row / column = 1 Code: isred = 123 ' What ever color red is if IsRed = Cells(x, y).Interior.Color then 'make next cell equal 1 Cells(x, y +1).value = 1 end if Upvote 0 Downvote
Very You need a loop to go through your list and where the returned color is red then make the next row / column = 1 Code: isred = 123 ' What ever color red is if IsRed = Cells(x, y).Interior.Color then 'make next cell equal 1 Cells(x, y +1).value = 1 end if
Apr 10, 2007 1 #3 Fenrirshowl Technical User Joined Apr 29, 2003 Messages 357 Location GB Michael Try something along the lines of: Code: Sub see_red() For Each cll In Selection If cll.Font.ColorIndex = 3 Then cll.Offset(0, 1) = 1 End If Next cll End Sub Highlight the column or the cells you want to check and then run the macro. I find it easiest to use the macro recorder when performing the desired action (here, turning certain cells red) and then modifying the code. Fen Upvote 0 Downvote
Michael Try something along the lines of: Code: Sub see_red() For Each cll In Selection If cll.Font.ColorIndex = 3 Then cll.Offset(0, 1) = 1 End If Next cll End Sub Highlight the column or the cells you want to check and then run the macro. I find it easiest to use the macro recorder when performing the desired action (here, turning certain cells red) and then modifying the code. Fen
Apr 10, 2007 Thread starter #4 micang Technical User Joined Aug 9, 2006 Messages 626 Location US Fen, Thank you so much, that works perfectly. Much appreciated. Michael Upvote 0 Downvote