Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been trying to figure this out for the past two days and it's driving me nuts so I'd greatly appreciate any help with this.

I'm updating a vacation request form so that when someone types in the date (1/22/14 for example) in column C(D) the corresponding day of the week will automatically pop up in column E(FG). I used the following formula: =TEXT(C13, "dddd") but here's where the problem comes in. Some of the rows in the E column are blank (because there's no date typed in column C) but others say "Saturday" and there's no corresponding date to go with it. I want E13-E21 to remain blank until someone puts a date into the corresponding cell (C13-C21). Is there anyway to fix this? I tried attaching a picture so you could see what I'm talking about but "you need at least 10 reputation to post images".

Thanks for any help!

share|improve this question

1 Answer 1

You can use an IF to do that, along with a blank check-er.

=IF(ISBLANK(C13), "", TEXT(C13, "dddd"))

I believe you are getting Saturday, because 1 in excel is equivalent to the date 01/01/1900 which is a Sunday and 0 is thus a day before that, Saturday.

share|improve this answer
    
Right on, TEXT(0,"dddd") is indeed Saturday, apparently the start of the week?! –  panhandel Jan 23 at 20:23
    
@panhandel If Excel's date was based on 2014, text(1, "dddd") would give Wednesday (since 01/01/2014 is a Wednesday, I'd expect and =text(0,"dddd") to be Tuesday). There's nothing about the start of the week here. –  Jerry Jan 23 at 20:41
    
+1 for the formula. Great way to handle it. 0 equates to Jan 0, 1900 in Excel's date-speak. Since Jan 1, 1900 was a Sunday, the day before that is "logically" a Saturday. –  guitarthrower Jan 24 at 0:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.