+ Reply to Thread
Results 1 to 3 of 3

Using TEXT and INDIRECT formulae together

  1. #1
    Registered User
    Join Date
    04-19-2013
    Location
    New Haven, CT
    MS-Off Ver
    Excel 2007
    Posts
    2

    Using TEXT and INDIRECT formulae together

    I'm trying to convert a "number" value date to a "text" value date so that I can pull data from multiple spreadsheets (in the same workbook) that are titled with the "text" value date. It appears that the TEXT function does not actually return text, because the INDIRECT formula can't find the spreadsheets in the workbook.

    My spreadsheet looks something like this:

    Row 1: Date (numerical value)

    Row 2: Date (text value supposedly returned by TEXT function from Row 1)

    Row 3: Data 1 (pulled from various spreadsheets entitled with Date text values identical to the text in Row 2)
    Row 4: Data 2 etc.
    Row 5: Data 3 etc.


    I know the INDIRECT formula works if I type the date into the cell as text, i.e. with a preceeding apostrophe.

    What am I missing?

    Thanks in advance for your help.

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

    Re: Using TEXT and INDIRECT formulae together

    My guess is you are missing the single quotes around the "date" The formula might look something like this

    =VLOOKUP($A$4, INDIRECT("'"&A$2&"'!A1:B3"),2,FALSE)
    Take a look at the attachment
    Attached Files Attached Files
    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
    04-19-2013
    Location
    New Haven, CT
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Using TEXT and INDIRECT formulae together

    Thanks for your prompt response ChemistB.

    Although your suggestion did not fix the issue, it did lead me to the ultimate source of the problem. Apparently, formatting the date with dashes (minus signs) in it converts it back to a numerical value. Remove the dashes from the formula = everything works okay.

+ 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