xluser2007
02-09-2008, 11:27 PM
Hi All,
At work, we often have check formulae in cells e.g. A1 =10, and A2 =10, then a check formula in A3 to esnure that A1=A2, would read as:
A3 = if(A1-A3=0, "a", "r")
The answer will in this example be "a". If you format this in Webdings format, the "a" becomes a tick and the "r" a cross - hence a useful eye check.
I've written a simple macro as follows to format using the Webdings format:
Sub tickformat()
ActiveCell.Select
With Selection
.Font.Bold = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Font.ColorIndex = 3
.Font.Name = "Webdings"
End With
End Sub
This works, but only if I select ONE cell. How do I generalise this so that I can select any number of cells and then change format essentially recreating the BOLD or ITALICS funtion but in a differenyt format.
Any help would be appreciated.
(Note as per yesterdays discussion, this has not been cross posted, though if I ever accidentally do again, I know that Simon Llyod will keep me honest :))
At work, we often have check formulae in cells e.g. A1 =10, and A2 =10, then a check formula in A3 to esnure that A1=A2, would read as:
A3 = if(A1-A3=0, "a", "r")
The answer will in this example be "a". If you format this in Webdings format, the "a" becomes a tick and the "r" a cross - hence a useful eye check.
I've written a simple macro as follows to format using the Webdings format:
Sub tickformat()
ActiveCell.Select
With Selection
.Font.Bold = True
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.Font.ColorIndex = 3
.Font.Name = "Webdings"
End With
End Sub
This works, but only if I select ONE cell. How do I generalise this so that I can select any number of cells and then change format essentially recreating the BOLD or ITALICS funtion but in a differenyt format.
Any help would be appreciated.
(Note as per yesterdays discussion, this has not been cross posted, though if I ever accidentally do again, I know that Simon Llyod will keep me honest :))