+ Reply to Thread
Results 1 to 4 of 4

INDIRECT with conditions problem - spreadsheet copied weekly same rows/colums/names

  1. #1
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    INDIRECT with conditions problem - spreadsheet copied weekly same rows/colums/names

    Hi everyone,

    i'm still trying to learn indirect so hoped someone can create a formula for me so i can start with something and add to it as i understand it

    Okay so i have a workbook with spreadsheets named Monday of each week like : 01.07 next would be 08.07 etc
    Each spreadsheet is a copy of a previous one.

    Each has week date i.ex 01/07/2013 in cell D1
    I'd like to sum column O of the previous week in column J of current week if columns D and E match D E of previous week


    so been trying indirect doing cell D1-7 to get the correct date to sum across all the worksheets but just got a headache..
    \1
    basically i need to know what were the previous arrears for the children, each week has to have column O contents in column J of the following week if possible..
    criteria would be if D1=D1-7
    and column D & E which contains name and surname


    could do regular sumifs but it doesnt meet my needs...

    Anyone willing to help pleaaase?

    workbook attached
    nursery.xlsx

    ps. sorry for the attachments not sure how to do it >.>


    can we do something like if D1=D1-7 then =sumifs(O:O,D:D,D4,E:E,E4)
    where O = week arrears
    D = suname
    E = name

    i just can't merge it with INDIRECT ;(
    Attached Images Attached Images
    Last edited by annazet; 07-04-2013 at 09:38 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: INDIRECT with conditions problem - spreadsheet copied weekly same rows/colums/names

    Dates have to be formatted. In D1 you have the format MM/DD/YYYY but you indicate you have sheet names formatted MM.DD, not the same thing.

    Since INDIRECT() is text function and dates are numeric displayed as text, you have to control the displayed text even inside formulas. At least you do for something like this.

    So, to get the correct text string for D1-7, you would need: TEXT(D1-7, "MM.DD") ok?

    To put that into your SUMIFS() as an indirect reference:

    =SUMIFS(INDIRECT(TEXT(D1-7, "MM.DD")&"!O:O"),INDIRECT(TEXT(D1-7, "MM.DD")&"!O:O"),D4,INDIRECT(TEXT(D1-7, "MM.DD")&"!E:E"),E4)
    Last edited by JBeaucaire; 07-04-2013 at 11:21 AM.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    02-07-2013
    Location
    London
    MS-Off Ver
    Excel 2019
    Posts
    105

    Re: INDIRECT with conditions problem - spreadsheet copied weekly same rows/colums/names

    i think this is what I need although I don't know... maybe I complicate things.
    Tried your solution JBeaucaire ( I AM SO GRATEFUL can't remember how many times I tried to automate this.. I always copy week arrears to previous arrears on the new sheet.. which is so time consuming..) but it returns value error I formatted D1 to MM.DD as well as named tabs in same format so MM.DD


    I FOUND IT!!!!!!!! the formula had O:D for first criteria instead of O:O
    You really made my day and work way easier from this day on! I hope one day I'll be as good as you are! Thank you again!
    Last edited by annazet; 07-04-2013 at 10:27 AM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: INDIRECT with conditions problem - spreadsheet copied weekly same rows/colums/names

    Glad to help. If you're already using INDIRECT() referencing and understand it, you're well on your way.

+ 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