+ Reply to Thread
Results 1 to 3 of 3

Assign String to Number value

  1. #1
    Registered User
    Join Date
    10-01-2009
    Location
    Manassas, VA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Assign String to Number value

    Hello everyone,

    I want to assign a String or Month/Year to a computed value.

    Example: I have about 6 cells that compute and return results in number format. Now instead of display the value, I would like to have the results display the text next to it.

    Also, can these be hidden in the format or it has to be somewhere on the worksheet.

    The attachment would give further details.


    8 August 2010
    7 July 2010
    6 June 2010
    5 May 2010
    4 April 2010
    3 March 2010
    2 February 2010
    1 January 2010
    0 December 2009
    -1 November 2009

    Thank you for your help,

    NTB
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Assign String to Number value

    Do you mean something like

    C3: =TEXT(EDATE("2009-12-01",9-SUM(C$2:$F$2)+1),"mmmm yy")
    C5: =TEXT(EDATE("2009-12-01",9-SUM(D2:F2)),"mmmm yy")

    etc...

    You could even leave EDATE formula to return the date value and then use a Custom Format to display as mmmm yy, eg:

    C3: =EDATE("2009-12-01",9-SUM(C$2:$F$2)+1)
    C5: =EDATE("2009-12-01",9-SUM(D2:F2))

    Format cells with custom format of: mmmm yy;;

    The narrative is not consistent (ie show February and show month / year)

  3. #3
    Registered User
    Join Date
    10-01-2009
    Location
    Manassas, VA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Assign String to Number value

    It should be mmmm/yyyy, Sorry for not being cleared.
    Your formula works and I love it.

    Though I am hoping to have this formula in VBA coding.

    Thank you,

    NTB

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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