+ Reply to Thread
Results 1 to 6 of 6

Forumla help - sumif maybe?

  1. #1
    Registered User
    Join Date
    03-05-2015
    Location
    london
    MS-Off Ver
    365 MSO
    Posts
    17

    Talking Forumla help - sumif maybe?

    Hi all,

    Am in need of a bit of help with a formula. The formula needs look at the depot cover and calculate the forward forecast. So if depot cover is:

    less than or equal to 1 - then it needs to add weeks 34,35,36 and 37.
    greater than 1 but, less than or equal to 2 - then add weeks 35, 36, 37
    greater than 2 but, less than or equal to 3 - then add weeks 36 and 37
    greater than 3 but, lets than or equal to 4 - then = week 37
    greater than 4 = 0

    Attachment 419148

    Hope that makes sense

    TIA
    Attached Files Attached Files
    Last edited by holly1212; 09-15-2015 at 06:42 AM. Reason: Adding example workbook

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Forumla help - sumif maybe?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Cheers!
    Deep Dave

  3. #3
    Registered User
    Join Date
    03-05-2015
    Location
    london
    MS-Off Ver
    365 MSO
    Posts
    17

    Re: Forumla help - sumif maybe?

    Done - example attached. Sums the greens cells

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Forumla help - sumif maybe?

    Try this

    =CHOOSE(IF(B2<=1,1,IF(AND(B2>1,B2<=2),2,IF(AND(B2>2,B2<=3),3,IF(AND(B2>4,B2<=4),4,5)))),SUM(I2:L2),SUM(J2:L2),SUM(K2:L2),L2,0)

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Forumla help - sumif maybe?

    Try this ...in F2 and copy down

    =SUM(OFFSET($A$1,ROW()-1,COUNTA($A$1:$zz$1)-4+INT(($B2+0.5)),1,4))

    On the assumption that Week 38 data will follow so you want the last 4, (3, 2,1) weeks i.e 35, 36.37, 38

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,178

    Re: Forumla help - sumif maybe?

    The "Depot Cover" are misleading as they are not integer values (only displayed as such) so in row 15 the "Depot Cover" is 3.89.... so according to your criteria we should have a value of 55 where as you show 0 in your example.

    My formula tried to allow for this but not sure it is robust in this regard.

    The other formula could be simplified to

    =CHOOSE(IF(B8<=1,1,IF(B8<=2,2,IF(B8<=3,3,IF(B8<=4,4,5)))),SUM(I8:L8),SUM(J8:L8),SUM(K8:L8),L8,0)

+ 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. Forumla error - SumIf
    By SharpL in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-10-2014, 09:40 AM
  2. [SOLVED] simplification of sumif forumla
    By smartphreak in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-15-2013, 06:32 AM
  3. [SOLVED] Forumla Help - SumIf/SumIfs??
    By jlo33 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-31-2013, 02:25 PM
  4. Sumif forumla not working
    By prashanthng in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-24-2013, 12:38 AM
  5. [SOLVED] Vlookup Sumif Forumla
    By MROMAR in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-27-2012, 02:58 PM
  6. Countif Or sumif forumla
    By masond3 in forum Excel General
    Replies: 2
    Last Post: 09-25-2012, 07:48 AM
  7. Countif Or sumif forumla
    By masond3 in forum Excel General
    Replies: 4
    Last Post: 07-06-2012, 08:00 AM

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