+ Reply to Thread
Results 1 to 9 of 9

formatting cells and tabs for Indirect formula.

  1. #1
    Forum Contributor
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    107

    formatting cells and tabs for Indirect formula.

    I'm using this formula and I have problem with indirect because my tabs have dates and I can't find any way to format my cells in column A to read the tabs but in same time being recognoizable as a date. Any ide how to change cell format or tab format so its understandable what date it is and that formula picks it up?

    SUMIF(INDIRECT(A1&"!C:C"),"sales",INDIRECT(A1&"!E:E"))
    Last edited by jimstrongy; 02-10-2012 at 06:09 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: formatinf cells and tabs for Indirect formula.

    Try:

    =SUMIF(INDIRECT(TEXT(A1,"mmmyy")&"!C:C"),"sales",INDIRECT(TEXT(A1,"mmmyy")&"!E:E"))

    change the format "mmmyy" to match the format of the tab name.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Contributor
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: formatinf cells and tabs for Indirect formula.

    Quote Originally Posted by NBVC View Post
    Try:

    =SUMIF(INDIRECT(TEXT(A1,"mmmyy")&"!C:C"),"sales",INDIRECT(TEXT(A1,"mmmyy")&"!E:E"))

    change the format "mmmyy" to match the format of the tab name.
    NBVC none of that works my tab originaly had 10-01-11 and I custom formated cell to mm-dd-yy. That didn't work and I tried changing tab names to 10 01 11 and custom formating cell to accept that but no luck. Only way it works is if I put 100111 but that really doesn't help human eye recognize the date on the tab.
    Any other ways to go around this issue?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: formatting cells and tabs for Indirect formula.

    Try:

    =SUMIF(INDIRECT("'"&TEXT(A1,"mm-dd-yy")&"'!C:C"),"sales",INDIRECT("'"&TEXT(A1,"mm-dd-yy")&"'!E:E"))

    with tab named 10-01-11 (assuming that is Oct 1, 2011)

  5. #5
    Forum Contributor
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: formatting cells and tabs for Indirect formula.

    Quote Originally Posted by NBVC View Post
    Try:

    =SUMIF(INDIRECT("'"&TEXT(A1,"mm-dd-yy")&"'!C:C"),"sales",INDIRECT("'"&TEXT(A1,"mm-dd-yy")&"'!E:E"))

    with tab named 10-01-11 (assuming that is Oct 1, 2011)
    Thanks NBVC, that worked great, just a quick question besides "sales" that I'm adding here if I want to add one more criteria "tax" is there a quick way to adjust this formula to sum "sales" and "tax" together?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: formatting cells and tabs for Indirect formula.

    Do you mean that "sales" and "tax" can both be found in column E? or are they in separate columns?

  7. #7
    Forum Contributor
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: formatting cells and tabs for Indirect formula.

    Quote Originally Posted by NBVC View Post
    Do you mean that "sales" and "tax" can both be found in column E? or are they in separate columns?
    Same columns.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: formatting cells and tabs for Indirect formula.

    Try:

    =SUM(SUMIF(INDIRECT("'"&TEXT(A1,"mm-dd-yy")&"'!C:C"),{"sales","tax"},INDIRECT("'"&TEXT(A1,"mm-dd-yy")&"'!E:E")))

  9. #9
    Forum Contributor
    Join Date
    11-25-2011
    Location
    US
    MS-Off Ver
    Excel 2010
    Posts
    107

    Re: formatting cells and tabs for Indirect formula.

    Thanks NBVC., that works!

+ 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