View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Color cell font text based on cell type? How do it.

Can you clarify something for me? What exactly do you mean when you say "if
the cell is linked to another part of the workbook"?

--
Rick (MVP - Excel)


"Chet" wrote in message
...
On Nov 21, 5:54 pm, JLGWhiz wrote:
Sub ColorSpecialCellsFont()
'The If statement avoids error message
Set myRange = Sheets(1).Range("b2:b6")
If Not myRange.SpecialCells(xlCellTypeFormulas).Count < 1 Then
myRange.SpecialCells(xlCellTypeFormulas).Font.Colo rIndex = 3
End If
End Sub



"Chet" wrote:
I can write vba code but this has me stumped. Does anyone have an
idea how to format cell text color by the property of the type of cell
it is?


For example if the cell is a constant the font would be red, if the
cell has a formula in it then it would be blue, and if the cell is
linked to another part of the workbook then it would be green.


I would be greatful for any ideas.


Thanks,


Chet- Hide quoted text -


- Show quoted text -


I kind of understand you are doing this, but how would i detect cells
where that particular cell is linked to another cell?