Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

how to color numeric character in excel cell ?

  Asked By: Emily    Date: Nov 20    Category: MS Office    Views: 1688
  

how can i color numeric Characters in excel cell with specific color
and text Characters with different color

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Leon Evans     Answered On: Nov 20

try using a formula in custom format, eg if(>1000000,[red],[blank]

 
Answer #2    Answered By: Garai Chalthoum     Answered On: Nov 20

THX
but it dosent work !!!!!!!!!!!!!!

 
Answer #3    Answered By: Caitlin Brown     Answered On: Nov 20


This is the generic method for applying color  to part of a cell.

ActiveCell.Characters(Start:=3, Length:=3).font _
.ColorIndex=4

You would vary the Start, Length, and ColorIndex for the result you want.

I would have a for-next loop to step through the relevant cells
In that I would have a for-next loop to step through the characters  in the
cell
In that I would have a select case structure based on the code of each
character to set the color index
Immediately after the end select you have the line to set the color of the
character.

 
Answer #4    Answered By: Mamie Wallace     Answered On: Nov 20

but the possition of the numeric  character is deferent form cell  to
another
i found this code in google groups



Sub BoldTwos()
Dim c As Range
Dim s As Long
Const Twos As String = "2"


For Each c In Selection
s = 1
With c
.NumberFormat = "@"
.Value = CStr(.Value)
Do While InStr(s, c.Text, Twos) > 0
s = InStr(s, c.Text, Twos)
.Characters(s, 1).Font.Bold = True
.Characters(s, 1).Font.Color = vbRed
s = s + 1
Loop
End With
Next c


End Sub
but i need to bold an color  all numbers 1'2'3'4'5'6'7'8'9'0

 
Answer #5    Answered By: Randy Warren     Answered On: Nov 20

That is why I told you to step through the characters  in the cell  and color
each one.

 
Didn't find what you were looking for? Find more on how to color numeric character in excel cell ? Or get search suggestion and latest updates.




Tagged: