Home |
Search |
Today's Posts |
#4
![]() |
|||
|
|||
![]()
1) Below is code that will accomplish #1
2) Yes. Though you could copy cell G2, then pastespecial formats onto other cells. HTH, Bernie MS Excel MVP Sub TryNow() Dim i As Integer Range("D1").Value = Range("D1").Value Range("H1").Value = Range("H1").Value For i = 1 To Len(Range("D1").Value) If Mid(Range("D1").Value, i, 1) < Mid(Range("H1").Value, i, 1) Then With Range("D1").Characters(Start:=i, Length:=1).Font .ColorIndex = 3 .Bold = True End With With Range("H1").Characters(Start:=i, Length:=1).Font .ColorIndex = 3 .Bold = True End With End If Next i End Sub "kwkhoo" wrote in message ups.com... understood. thanks bernie 1) what if i convert the formulas into values? will it help? i have converted the H1 cell to a value of "3-4-5" and D1 cell to "3-3-3", i've got bits and pieces of codes here, (thanks ya all) but i don't know how to compile them into one nice macro due to my lack of vb skills it's goes along like, if e1a1, then Left(H1,1) = red, else do nothing if f1b1, then mid(H1,3,1) = red, else do nothing if g1c1, then right(H1,1) = red, else do nothing this is what i found to color it red and bold: Function SECTORA() With ActiveCell.Characters(Start:=1, Length:=1).Font .ColorIndex = 3 .Bold = True End With End Function 2) so you mean even if i color my text first using conditional format in G2, there's no way to "copy the colors" without doing a conditional format. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional formatting applicable to entire column | Excel Worksheet Functions | |||
Copying conditional formatting...HELP PLEASE!!!! | Excel Worksheet Functions | |||
Conditional formatting based on text | Excel Worksheet Functions | |||
bolding cells in conditional formatting | Excel Worksheet Functions | |||
conditional formating - Highlighting text cells based on sales res | Excel Discussion (Misc queries) |