+ Reply to Thread
Results 1 to 8 of 8

Banding formula

  1. #1
    Registered User
    Join Date
    12-07-2018
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    11

    Banding formula

    hi, having an issue coming up with a formula to take to account banding with different prices.

    Essentially i'd like a formula in cell I7 which is based on a manual number of transaction put in I5 and using the start & End range works out the potential cost.

    It is an accumulated banding formula I am looking for.

    Hopefully the excel file is self-explanatory.

    Really struggling with this one.
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Banding formula

    Please try

    =SUMPRODUCT(TEXT(I5-N(+C6:C10),"0;\0;0")*(D7:D11-N(+D6:D10)))
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-07-2018
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Banding formula

    Quote Originally Posted by Bo_Ry View Post
    Please try

    =SUMPRODUCT(TEXT(I5-N(+C6:C10),"0;\0;0")*(D7:D11-N(+D6:D10)))
    great stuff! thank you!

    I managed to figure out a way to get the answer but its horrible compared to what you have provided;-

    =IF(AND(I5>=B7,$I$5<=C7),($I$5*D7),IF(AND($I$5>=B8,$I$5<=C8),((C7-B7)*D7)+(($I$5-B8)*D8)+D8,IF(AND($I$5>=B9,$I$5<=C9),((C7-B7)*D7)+((C8-B8)*D8)+(($I$5-B9)*D9)+D9+D8,IF(AND($I$5>=B10,$I$5<=C10),((C7-B7)*D7)+((C8-B8)*D8)+((C9-B9)*D9)+(($I$5-B10)*D10)+D10+D9+D8,((C7-B7)*D7)+((C8-B8)*D8)+((C9-B9)*D9)+((C10-B10)*D10)+(($I$5-C10)*D11)+D8+D9+D10))))

  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Banding formula

    Quote Originally Posted by Bo_Ry View Post
    =SUMPRODUCT(TEXT(I5-N(+C6:C10),"0;\0;0")*(D7:D11-N(+D6:D10)))
    Why did you add the TEXT function in there? It seems to work fine without it

    =SUMPRODUCT((I5-N(+C6:C10))*(D7:D11-N(+D6:D10)))

  5. #5
    Registered User
    Join Date
    12-07-2018
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Banding formula

    Quote Originally Posted by Bob Phillips View Post
    Why did you add the TEXT function in there? It seems to work fine without it

    =SUMPRODUCT((I5-N(+C6:C10))*(D7:D11-N(+D6:D10)))
    thanks. im now trying to figure out how this formula works but key thing is, it works!

  6. #6
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Banding formula

    The question is to the responder, but FYI, it is essentially a variable rate formula.

    (I5-N(+C6:C10)) builds an array of the number of transactions reduced by each band, aka 5000,4000,33000,2000,1000.

    The other part, (D7:D11-N(+D6:D10)), builds takes the start prices (0,1.0.05,0.04,0.03,0.02,0.01) minus the previous start (text,0,1.0.05,0.04,0.03,0.02) to give an array of price differentials (0.1, -0.05, -0.01, -0.01, -0.01).

    The two arrays are multiplied and summed with SUMPRODUCT to get the result.

    As I said, it seems to work fine without the TEXT function.
    Last edited by Bob Phillips; 08-28-2020 at 12:06 PM.

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Banding formula

    Please try with transactions 1000,2000,… and compare the result with and without TEXT function.

  8. #8
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Banding formula

    Ah, I see, the text gets rid of the negative values. Thanks man, I should have seen that.

+ 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] if else banding
    By nicci113 in forum Excel General
    Replies: 5
    Last Post: 08-28-2014, 11:06 AM
  2. Generation Banding
    By forrestgump1980 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-20-2013, 08:57 AM
  3. Banding Rows, but only ones that need it
    By Aegwyn11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2012, 01:31 PM
  4. Number Banding
    By Djsban in forum Excel General
    Replies: 3
    Last Post: 04-30-2010, 06:02 AM
  5. Excel 2007 : Excel Banding
    By Strathcona in forum Excel General
    Replies: 10
    Last Post: 08-13-2009, 01:58 PM
  6. Row Banding
    By berz in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-24-2008, 03:22 AM
  7. formula color banding hidden rrrr
    By Mons in forum Excel General
    Replies: 1
    Last Post: 06-20-2007, 08:36 AM

Tags for this Thread

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