+ Reply to Thread
Results 1 to 4 of 4

change in numbers

  1. #1
    Registered User
    Join Date
    07-04-2007
    Posts
    22

    change in numbers

    hi
    is there a command that allows a total to be displayed at the end of a change in numbers?
    i.e. if you have a column of numbers say 30 5's then 42 6's to total up all the 5's where it changes to 6's
    I can't imagine there is

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If your range is say from A1:A100, then this formula will find the first 5 and sum until it finds the last 5...but the 5's have to all be grouped together or it will include the values between to:

    =SUM(INDEX(A1:A100,MATCH(5,A1:A100,0)):INDEX(A1:A100,MATCH(2,1/(A1:A100=5))))


    adjust ranges to suit and change the 5's to whatever number or reference you desire.


    formula must be confirmed with CTRL+SHIFT+ENTER not just ENTER
    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
    Registered User
    Join Date
    07-04-2007
    Posts
    22
    thanks for that works a treat
    which bit of it would i change if i wanted to sum column B that related to the fives in column A
    so if i put a series of 5's in column A for a product it would sum the totals in column B

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Just adjust the first ranges in the Index() functions.

    e.g.

    =SUM(INDEX(B1:B100,MATCH(5,A1:A100,0)):INDEX(B1:B100,MATCH(2,1/(A1:A100=5))))

+ 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