+ Reply to Thread
Results 1 to 4 of 4

Array

  1. #1
    Forum Contributor
    Join Date
    06-10-2004
    Posts
    121

    Array

    I have a spreadsheet of various types of expenditure, for example:


    Date in column A

    Column B
    Visa
    chq
    cash
    DD
    Visa
    cash
    chq
    chq

    etc

    with the values in column C

    I am trying to use sumif to have subtotals of the different types of expenditure.

    I'm missing something obvious............. well it is Friday pm

    thanks

  2. #2
    Peo Sjoblom
    Guest

    Re: Array

    =SUMPRODUCT(--(B2:B10="Visa"),C2:C10)

    or

    =SUMIF(B2:B10,"Visa",C2:C10)

    assuming the amounts are in C will sum for Visa
    if you want to include dates from A you need sumproduct

    =SUMPRODUCT(--(A2:A10=DATE(2005,10,30)),--(B2:B10="Visa"),C2:C10)

    will sum column C when A is Oct 30 2005 and B is Visa


    Regards,

    Peo Sjoblom

    "tghcogo" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have a spreadsheet of various types of expenditure, for example:
    >
    >
    > Date in column A
    >
    > Column B
    > Visa
    > chq
    > cash
    > DD
    > Visa
    > cash
    > chq
    > chq
    >
    > etc
    >
    > with the values in column C
    >
    > I am trying to use sumif to have subtotals of the different types of
    > expenditure.
    >
    > I'm missing something obvious............. well it is Friday pm
    >
    > thanks
    >
    >
    > --
    > tghcogo
    > ------------------------------------------------------------------------
    > tghcogo's Profile:

    http://www.excelforum.com/member.php...o&userid=10494
    > View this thread: http://www.excelforum.com/showthread...hreadid=484260
    >




  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996
    Two methods come to mind:

    Method 1 (Subtotals):
    •Make sure columns have Headings (Date, Payment Type, Amount, etc)
    •Sort your list by Payment Type
    •Select the whole list
    •Data>Subtotals
    -At each change in: Payment Type
    -Use Function: SUM
    -Add Subtotal to : Amount
    •Click OK

    Method 2 (Pivot Table):
    •Make sure columns have Headings (Date, Payment Type, Amount, etc)
    •Select your list
    •Data>Pivot Table
    -Excel list
    -The range should already by selected, but adjust if necessary
    -Click the [layout] button
    -Drag the Payment Type box to ROW
    -Drag the Amount box to DATA
    -(If the new label says Count of Amount, double click it and change to SUM)
    -Click [OK]
    -Select either New Worksheet or Select a location in the current sheet for the Pivot Table
    -Click Finish
    •Now, as you add data to the list, you can adjust the Pivot Table source range and click [Finish] for the latest totals
    >Note: Pivot Tables only update on demand, not each time the data changes.


    Does that help?

    •••••••••••••
    Regards,
    Ron

  4. #4
    Forum Contributor
    Join Date
    06-10-2004
    Posts
    121
    thanks Peo,

    =SUMIF(B2:B10,"Visa",C2:C10)

    worked fine, my formula was the same, but for some reason wouldn't work, untill I cleared all the cells and pasted yours in!!!!

    Ron, thanks for your advice, I didn't need to go that route in the end, but it looked an interesting way of getting the answer.

    Thanks to both of you

+ 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