+ Reply to Thread
Results 1 to 6 of 6

"Indirect" with Date format worksheet name

  1. #1
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    "Indirect" with Date format worksheet name

    there is one workbook with lots of worksheets, and each worksheet will use "mmm-yy"" (Feb-16) format as their name.

    in another worksheet , I want to see the value of D19 in worksheet (name: Feb-16),

    A1="Feb-16" (Date format, I got this by using "get.workbook")
    B1=D19 (text format)


    C1=INDIRECT(A1&"!"&B1) then will get "'#REF",
    (if I change the name from "Feb-16" to "xxx"(or other non-date value), it will work......

    did I do something wrong in formula at C1??? (if name is Date format) thanks !!!

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: "Indirect" with Date format worksheet name

    Try it like this...

    =INDIRECT("'"&A1&"'!"&B1)

    In "exploded view" (all those quotes makes it hard to read)...

    =INDIRECT(" ' " & A1 & " ' ! " & B1)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: "Indirect" with Date format worksheet name

    What 'Exactly' is in A1?
    Is it a real date, and you have the cell formatted to show as mmm-yy ?

    Try
    =INDIRECT("'"&TEXT(A1,"mmm-yy")&"'!"&B1)

  4. #4
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    Re: "Indirect" with Date format worksheet name

    Wooo, it is awesome !! thanks for sharing !!!

    Quote Originally Posted by Tony Valko View Post
    Try it like this...

    =INDIRECT("'"&A1&"'!"&B1)

    In "exploded view" (all those quotes makes it hard to read)...

    =INDIRECT(" ' " & A1 & " ' ! " & B1)

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: "Indirect" with Date format worksheet name

    You're welcome. Thanks for the feedback!

  6. #6
    Forum Contributor
    Join Date
    12-13-2013
    Location
    Calgary,AB,Canada
    MS-Off Ver
    2016,O365
    Posts
    236

    Re: "Indirect" with Date format worksheet name

    Yes, I also consider that one before(using "Text" to convert it into text format value), but it didn't work until I added the little " ' " .

    A1 has the name of worksheet by using "get.workbook", it has "date" format


    Quote Originally Posted by Jonmo1 View Post
    What 'Exactly' is in A1?
    Is it a real date, and you have the cell formatted to show as mmm-yy ?

    Try
    =INDIRECT("'"&TEXT(A1,"mmm-yy")&"'!"&B1)

+ 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. [SOLVED] How to convert date format "20150501" to standard date format "01-MAY-15"
    By kartsag09 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-20-2016, 12:54 PM
  2. Replies: 1
    Last Post: 01-22-2016, 09:21 AM
  3. Replies: 5
    Last Post: 07-16-2015, 10:14 AM
  4. [SOLVED] Date Format "d-mmm-yy" as Worksheet Name does not sort properly
    By tv69 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-13-2013, 03:35 PM
  5. Date format of just "st" "nd" "rd" and "th" with text included
    By notrandom in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-10-2013, 05:45 PM
  6. [SOLVED] "indirect" and "date" formula
    By amar05 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-29-2013, 09:42 AM
  7. [SOLVED] [SOLVED] VBA does not recognize Excel worksheet function "indirect"
    By Todkerr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-12-2005, 04:05 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