+ Reply to Thread
Results 1 to 5 of 5

Formula to find day number of year

  1. #1
    Registered User
    Join Date
    09-12-2008
    Location
    Oregon
    Posts
    9

    Formula to find day number of year

    I am looking for a formula to look at a serial number of a date and return the day number in the year. i.e. 1/1/2008 would return 1 for a value, 12/31/08 would return 365.
    I cant find a formula for a day, the week would work also so i tried WEEKNUM(date) but that returned #name.
    I am using excel 2002.
    Anyone have any ideas for me?
    Thanks

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Maybe

    Please Login or Register  to view this content.
    Note 366 days as we had a leap year. Format cell as general

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    If A1 contains a date in any year, =A1 - DATE(YEAR(A1), 1, 0)
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    09-12-2008
    Location
    Oregon
    Posts
    9

    Thanks for the quick reply

    Thanks VBA,
    I almost got it wrong again, I forgot to format the formula cell to a number and kept getting 9/24/1900. Changed the format and it works correctly now.
    Thanks for help

  5. #5
    Registered User
    Join Date
    09-12-2008
    Location
    Oregon
    Posts
    9

    tried the other formula

    Just wanted to give some extra feedback. I tried the other formula and it works also. Thanks shg.

+ 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. enter month to equal number?
    By chappy in forum Excel - New Users/Basics
    Replies: 6
    Last Post: 11-26-2007, 12:45 PM
  2. Find last number and insert
    By jackhowson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-11-2007, 06:37 AM
  3. Future value of money?
    By Alib in forum Excel General
    Replies: 1
    Last Post: 01-13-2007, 04:36 AM
  4. Cell formula for month & day of 1st Sunday of year
    By mikeburg in forum Excel General
    Replies: 4
    Last Post: 01-04-2007, 09:22 PM
  5. Can not REPLACE number (formula) in a cell
    By FireWalker in forum Excel General
    Replies: 4
    Last Post: 10-17-2006, 05:18 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