Conditional Formatting =IF($B1>0, TEXT("dddd"))?

  • Thread starter Thread starter jbrantley
  • Start date Start date
J

jbrantley

I'm using Excel 2003. I'm trying to use conditional formatting to have
a blank cell change to the day of the week when a date is entered into
another cell.
 
Put this in your blank cell instead and with a date in B1 you get the day of
the week,

=TEXT(B1,"dddd")

Mike
 
No need to use conditional formatting for this.......if your date is in A1,
simply put =A1 in the cell where you want the day of the week and format that
cell for Custom > dddd

Vaya con Dios,
Chuck, CABGx3
 
I forgot to include the "=" :

=IF(AND(ISNUMBER($B1),$B1>0),TEXT($B1,"dddd"),"")

This version is more robust:

=IF(COUNT(B1,--(B1>0))=2,TEXT(B1,"dddd"),"")
 
Not possible with CF, which can only change formatting, or without a formula in
the "blank" cell.

Formula in B1 =A1 formatted to dddd

Or, of course, through VBA event code.

Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("A1:A10")) Is Nothing Then
With Target
If .Value <> "" Then
.Offset(0, 1).Value = Format(.Value, "dddd")
End If
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP
 
Back
Top