+ Reply to Thread
Results 1 to 8 of 8

Why is Saturday showing up in cells when there's no date present using the TEXT function?

  1. #1
    Registered User
    Join Date
    01-23-2014
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    3

    Why is Saturday showing up in cells when there's no date present using the TEXT function?

    Hello everyone,

    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've attached a picture as well.

    Thanks for any help with this!
    Attached Images Attached Images

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Why is Saturday showing up in cells when there's no date present using the TEXT functi

    because the cells contain 0 or blank and excel thinks that it is 0/jan/1900 which although doesnt exist is a saturday
    TEXT(C13, "dddd") if c13 is blank is 0
    use
    =IF(C13="","",TEXT(C13, "dddd"))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    01-23-2014
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Why is Saturday showing up in cells when there's no date present using the TEXT functi

    OK, thanks for responding. How do I fix this? As I stated above I'd like the columns to remain blank until someone enters a date.

    Thanks

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Why is Saturday showing up in cells when there's no date present using the TEXT functi

    Test to see if the cell is empty or test to see if the cell contains a number (In Excel dates are really just numbers formatted to look like dates).

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

    =IF(N(C13),TEXT(C13,"dddd"),"")
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Why is Saturday showing up in cells when there's no date present using the TEXT functi

    wasn't the answer in post #2?

  6. #6
    Registered User
    Join Date
    01-23-2014
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Why is Saturday showing up in cells when there's no date present using the TEXT functi

    martindwilson I apologize as I didn't see your solution the first time I only saw this "because the cells contain 0 or blank and excel thinks that it is 0/jan/1900 which although doesnt exist is a saturday
    TEXT(C13, "dddd") if c13 is blank is 0".

    But I'd like to thank you and Tony Valko so so much because the problem is solved.

    Thank you so so much!!

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Why is Saturday showing up in cells when there's no date present using the TEXT functi

    Here's one other way

    =TEXT(C13,"dddd;;")
    Audere est facere

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Why is Saturday showing up in cells when there's no date present using the TEXT functi

    You're welcome. We appreciate the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 13
    Last Post: 09-06-2013, 07:52 PM
  2. WORKDAY function returning Saturday date
    By mmorris11 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-28-2013, 09:49 AM
  3. [SOLVED] sum cells IF no text present
    By LLM in forum Excel General
    Replies: 3
    Last Post: 02-09-2006, 03:00 PM
  4. [SOLVED] Date Function:default to the present time
    By Khangura in forum Excel General
    Replies: 1
    Last Post: 12-21-2005, 05:40 AM
  5. [SOLVED] Cell colour chg when formula results equal a weekend day, i.e., "Saturday" and a date that falls on a Saturday?
    By StargateFanFromWork in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-19-2005, 08:15 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1