+ Reply to Thread
Results 1 to 9 of 9

Use month as text in DATE() function

  1. #1
    Forum Contributor
    Join Date
    02-25-2008
    Posts
    101

    Use month as text in DATE() function

    Hiya,

    I'm using the =Date(D4,C4,C2) to generate a date from three cells. However, cell C4 reads as the moth in text as opposed to a number (e.g. April). any idea how I can overcome this problem without having to have a hidden cell with a long if/lookup formula?

    Thanks

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

  3. #3
    Forum Contributor
    Join Date
    04-11-2005
    Location
    London
    Posts
    259
    Try

    Please Login or Register  to view this content.
    Martin Short

  4. #4
    Forum Contributor
    Join Date
    04-11-2005
    Location
    London
    Posts
    259
    Actually a better version would be
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-25-2008
    Posts
    101
    Hiya, thanks for replies. MartinShort, that'll do fine. Was wondering basically if there was a function that turned a text month into the corresponding number. but nevermind.

    Martin Wilson, e.g.:
    D4 = 2008
    C4 = April
    B4 = 18
    To provide 19/04/2008 as a date in A1.

    Thanks again

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    or shorter still
    =TEXT((B4&"/"&C4&"/"&D4),"dd/mm/yy")
    or to get as a real date which can be used for calculation
    =VALUE(TEXT((B4&"/"&C4&"/"&D4),"dd/mm/yy"))
    Last edited by martindwilson; 09-16-2008 at 07:29 PM.

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Or =(B4 & C4 & D4) + 0

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    ah shg thats better!

  9. #9
    Forum Contributor
    Join Date
    04-11-2005
    Location
    London
    Posts
    259
    Now you're all showing off!

+ 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. Help With Date Calculation Function
    By dvent in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-05-2008, 10:13 AM
  2. Function to return boolean if activeworkbook name has specific text
    By ctmurray in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2008, 04:11 PM
  3. Date for Month
    By gilbert in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2007, 12:25 AM
  4. Date Function
    By jimmyjtn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-11-2007, 04:54 PM
  5. Date function
    By ssmith001 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2007, 10:35 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