+ Reply to Thread
Results 1 to 6 of 6

Dates Assignment

  1. #1
    Registered User
    Join Date
    03-03-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    15

    Dates Assignment

    Hello everyone

    Need to do the following for an assignment and I'm stumped. The textbook is useless so I've turned here for help. Any help is appreciated. Thanks

    "Initially there are no values displayed in Column D. The user enters their birth day in cell D3, birth month in D4, and birth year in D5. For example, if the user’s birthday is June 1 2005: 1, 6, and 2005 are entered. Formulas in cells D7, D8, D10, and D12 then compute and display the appropriate values. Do not display anything in D7, D8, D10, and D12 until the user fills in all 3 cells D3, D4, and D5"

    pjAPwsm.jpg

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Dates Assignment

    What you want to use is the DATE function
    =DATE(year, month, day)
    from there the other things are easy. (Look into cell formatting to get day of week and month)
    Hope that helps.
    Use IF statements to keep cells blank until something is entered
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    03-03-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    15

    Re: Dates Assignment

    Okay, I think I have the day of the week and month things figured out but every time I try to enter a date up top to test it just reverts to Jan 1900. I changed the day to formating of dd, month to mm, and year to yyyy. Any ideas what I'm doing wrong.

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Dates Assignment

    D3,4 and 5 should be formatted as General
    They are not dates until you combine them, using the DATE function in D7 or D8

  5. #5
    Registered User
    Join Date
    03-03-2015
    Location
    Canada
    MS-Off Ver
    2013
    Posts
    15

    Re: Dates Assignment

    These are what I've got but they don't seem to be working for my date of birth. I enter 02 for February and it displays as January. Whenever I leave the fill in portion blank they return a NUM error which I'm supposed to avoid.

    =IF(ISBLANK(D3:D5), "", DAY(DATE(D5,D4,D3)))

    =IF(ISBLANK(D3:D5), "", MONTH(DATE(D5,D4,D3)))

    And my age in days is returned as a negative number and has the NUM error like the others when blank.

    =IF(ISBLANK(D3:D5), "", DAYS(DATE(D5,D4,D3), TODAY()))
    Last edited by Flemminr; 03-03-2015 at 06:30 PM.

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Dates Assignment

    Getting there. ISBLANK will only accept a single cell so instead try

    =IF(COUNT(D3:D5)<3, "", your formula)
    COUNT counts the number of numbers in those cells. If it's less than 3 then leave blank

    If you are custom formatting your cells as dddd (gives day of week)
    and mmmm gives full name of the month (mmm gives 3 character abbreviation) THEN
    you don't need to modify the date, Excel looks at the date and returns the day and month, so remove the
    DAY and MONTH functions.

    Once you have the date of birth (DATE(D5,D4,D3) you just need to subtract that from today
    =TODAY()- DATE(D5,D4,D3) format as General

+ 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. Need Help On Assignment
    By danielmarshal in forum Excel General
    Replies: 0
    Last Post: 07-29-2014, 03:28 PM
  2. VBA Assignment HELP ME!!
    By shell.clam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2012, 12:45 AM
  3. new assignment - need help
    By ivykikoe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-26-2012, 05:40 AM
  4. Assignment Help?
    By owensmorgan in forum Excel General
    Replies: 2
    Last Post: 11-08-2005, 04:17 AM
  5. Key Assignment Log
    By Norma in forum Excel General
    Replies: 0
    Last Post: 05-12-2005, 12:06 PM

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