+ Reply to Thread
Results 1 to 7 of 7

Iterating Sum If or other ...

  1. #1
    Registered User
    Join Date
    04-30-2020
    Location
    Howden, England
    MS-Off Ver
    latest version
    Posts
    8

    Iterating Sum If or other ...

    Hi,

    There are a live set of orders and helis for each plant every release day of the week. Some plant's days are not changed very often (and are therefore sometimes not on the 'log' for months) but will always have a defined number of orders and helis.

    For each week in the year (weeknum) I need to capture the live number of orders and helis for each release day
    Some plants and days are exported more than others. In the example data, for instance, the latest sunday release day at plan DN53 would have been on 05/06/20 but all other days have been exported more recently.

    The week 43 live tab would therefore show all DN53 Mon-Sat from 20/10/2020 and sun orders and helis from 05/06/2020.

    The formula must return (in the live tab) the latest orders and helis for each release day of each plant. This will be captured weekly (for each financial weel)- 'live' tab will show a record of orders and helis for every release day and plant for each week (weeknum) of the year.

    Example data:
    In 'log' tab, shows raw data of exported orders and helis for each plant and each release day
    'Live Tab'- where the formula must return number of helis and orders (every week end a new weeknumber will be entered with corresponding list of plants and release days, we must therefore be able to copy the formula down for each new week)

    Hope this makes sense

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Iterating Sum If or other ...

    Hi
    can you fill in manually the live tab with the expected results, and explain how do you get to this number?
    it's a bit hard to follow your explanation.

  3. #3
    Registered User
    Join Date
    04-30-2020
    Location
    Howden, England
    MS-Off Ver
    latest version
    Posts
    8

    Re: Iterating Sum If or other ...

    Hi

    I have filled in the first part of the Live tab with correct numbers and noted the data that is missing from the example log tab.

    The number of Helis and orders per Plant/release day (each plant and release day will always have a number of orders and helis) will always be the latest ones in the log.
    For example,plant DN14 has many logs for the same release day but the live tab will always only show the latest for that specific release day.

    As week 43 passes, more logs will be captured and in week 44 it may be that DN22 Thu release day has a new number of helis and orders, so this will be captured in 'live' under week 44.
    However, DN22 Fri may not have any new logs so the latest release day Friday log will be captured for week 44 as that is hat is currently live (even though that may have a date from three months ago, it is still the latest for that release day and plant).

    Thanks
    Attached Files Attached Files

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,449

    Re: Iterating Sum If or other ...

    For Helix, row 2:

    Please Login or Register  to view this content.
    Copy to next cell for Orders, change Log!$I$2:$I$122 to column H

    Drag both down
    Attached Files Attached Files
    Quang PT

  5. #5
    Registered User
    Join Date
    04-30-2020
    Location
    Howden, England
    MS-Off Ver
    latest version
    Posts
    8

    Re: Iterating Sum If or other ...

    Thank you so much! That seems to have worked perfectly!
    Could you explain in simple terms how the formula works?

    Thanks

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,449

    Re: Iterating Sum If or other ...

    Let start with 3 condition ranges:

    1/(Log!$C$2:$C$122=$A2)/(Log!$D$2:$D$122=$B2)/(Log!$F$2:$F$122<=$C2)

    go thru each row to check, if all match, returns 1/1=1, else 1/0=#DIV/0
    For instance
    line 1: 1
    line 2: #/DIV/0
    line 3: 1
    line 4: #/DIV/0

    Then LOOKUP(2,Condition_range, result_range) match the last "1" found , then returns value in result_range

  7. #7
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Iterating Sum If or other ...

    Hi,
    Thanks, it helped understanding your logic.

    I still don't understand the blanks you would like to display, in some of them there is data matching to criteria so why would you like to leave that empty?

    Use this in D2 down and across for the info requested:
    =IFERROR(INDEX(Log!H$1:H$101,MATCH(2,1/(Log!$D$1:$D$101=$B2)/($C2>=Log!$F$1:$F$101)/(Log!$C$1:$C$101=Live!$A2))),"")

    Let me know the logic behind the empty lines and I will try to adjust...


    Ok, Bebo has beat me to it
    Last edited by Limor_OP; 10-21-2020 at 02:46 PM.

+ 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] Iterating variable questions
    By Inti in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-28-2014, 07:38 PM
  2. Iterating one array by another
    By Poolstick in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-28-2013, 02:41 PM
  3. Iterating through values
    By thepopasmurf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2010, 01:44 PM
  4. Solver add in not iterating
    By TheRandomer in forum Excel General
    Replies: 6
    Last Post: 11-17-2009, 10:39 AM
  5. Iterating files in folder
    By Minerva in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-11-2006, 06:10 AM
  6. iterating groups?
    By Mike in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2005, 07:05 AM
  7. [SOLVED] iterating checkboxes
    By [email protected] in forum Excel General
    Replies: 1
    Last Post: 05-11-2005, 04:06 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