date & day formatting

R

rnkshan

I have 2 cell. D4 for date and G4 for day of the week. I used the
formula in G4 - =text(D4, "dddd")

When I clear the contents in D4 cell it refers to Jan 1 2000 which is
a Saturday
How do I rectify this error. What I am trying is when no date is
entered in D4, G4 should return "-"
 
M

muddan madhu

Try this

In Cell G4 =IF(B38<>"",TEXT(B38,"dddd"),"-")

or

In Cell G4 = D4
Custom format the cell as dddd;"";"-"
 
S

Shane Devenshire

Hi,

Although this may not work in your case, depending on what you are trying to
do, another alternative is to change the format the first column to display
both date and day such as:

dddd, mmmm dd, yyyy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top