Color a single digit in a mult-digit number cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Suggestion for Microsoft

I would like to be able to format a single digit in a number cell that
contains 2 or more digits. For example, if I type 346 in a cell, I would like
to be able to bold or color just one of the digits, say the 3. The reason:
to help me test a theory. If the solution to a problem could be either a 3,
4, or 6 in a given cell, I migth want to test the theory that it's the 3. If
I could color the 3 in the cell containing 346, and then color the resulting
answer in other cells, I could track all the changes I made to test the
theory without erasing the other possible variables incase my theory is
wrong. Yes, I confess, it's to help me solve a five-star (highest
difficulty) Sudoku puzzle.

Other suggestions for testing a theory without eliminating the variables are
welcome. Programming an IF logic sequence would be too complex. (I've tried
just bracketing the theoretical numbers, but it gets clumsy, confusing and
cumbersome.)
--
PT




--
PT

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...c-884ff732d2d2&dg=microsoft.public.excel.misc
 
It seems to me that you cannot change the colour of a single digit in Excel.
If you change one, then you change them all. A suggestion is to copy the
cells to Word and use Edit, Replace. In Find What type 3. In Replace With do
not type anything but choose something under Format (for example Font Color
or Highlight or both). Do not enable Wildcards.
 
Martin

I couldn't understand the original post unfortunately, but you can change a
single character in excel. Just highlight it in the formula bar, format how
you want, bold, underline,colour, etc and voila!

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
(e-mail address removed)
 
Ref Nick's solution.

I would think numbers treated as text would be okay for a Sudoku puzzle
since the numbers don't have to represent any particular value, so to speak,
it's just the order that's important. A Sudoku puzzle could just as easy
use the first nine letters of the alphabet. Although on my Excel Sudoku
solver helper I made, I sum the number to see if all rows = 45, but of
course that's not necessary.

HTH
Regards,
Howard
 
I have done that with superscripts and subscripts, but am not aware of a way
in Edit, Replace so that it can be done en masse. (I have no idea what Suduko
is about).
 
Public Sub ColorMyCellDigits()
Dim intLen, i As Integer
If ActiveCell.Value = "" Then
Exit Sub
End If
ActiveCell.Select
Set A = Selection
intLen = Len(A.Value)

For i = 1 To intLen
If Mid(A.Value, i, 1) = 3 Then
A.Characters(i, 1).Font.Bold.Color = vbRed

End If
Next
 
Back
Top