View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PCLIVE PCLIVE is offline
external usenet poster
 
Posts: 1,311
Default CF to distinguish Formulas from Inputs

Here's one possible way you could test if the cell is a formula or not.

Sub test()

For Each cell In Range("D6:D7")
If Left(cell.Formula, 1) = "=" _
Then
MsgBox ("Cell " & cell.Address & " is a Formula.")
Else
MsgBox ("Cell " & cell.Address & " is Not a Formula.")
End If
Next cell

End Sub

HTH,
Paul


--

"Brian Ballek" wrote in message
...
Hi All,

I have been trying (unsuccessfully) to have Excel format cells with values
that are inputs (i.e. directly entered and NOT the result of formulas) so
that I can quickly distinguish actual values from the formulas used to
project the trends of these values into the future. But Excel seems to see
both types of cells as values regardless of whether the value was directly
entered or derived from a formula.

I'd be happy for any solution that will work, whether CF, user-defined
number format, or VBA. I've tried all 3 and haven't cracked it but my
knowledge of VBA is pretty limited.

Many thanks!
Brian Ballek