Change number property for cell on another sheet
Put the code in the Data sheet code module
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
set sh = Worksheets("Daily")
With Target(1)
If .Address(False, False) = "A1" Then
If IsEmpty(.Value) Then
sh.Range("A3").NumberFormat = "General"
Else
sh.Range("A3").NumberFormat = "0%"
End If
End If
End With
End Sub
--
Regards,
Tom Ogilvy
"Qaspec" wrote in message
...
I'd like the number format for the value in cells D1:D30 on
sheet2("daily")
to be a general number if a1("data") is empty and i'd like the format to
be a
percentage if a1("data") contains a value. This is similiar to a previous
post but this tim the cells are on different sheets.
|