+ Reply to Thread
Results 1 to 4 of 4

Adding category totals

  1. #1

    Adding category totals

    Hello Thanks for reading.

    I have 2 columns one has the Category and the other has the Time spent
    Example:

    A1=15 B1=Email
    A2=22 B2=Internet
    A3=43 B3=Hardware
    A4=23 B4=Internet

    You can see how cells B2 & B4 have the same category. What I would like
    to do is add them both together to get the total for internet (or any
    other category) so the result would be Internet = 45. I was thinking
    about using an IF statement something like:

    IF A1=internet add the value of B1 to the total.

    It would need to know that if it was in cell A7 to add B7 to the list.
    Any Ideas??


  2. #2
    Stephanie Aspinwall
    Guest

    RE: Adding category totals

    You can do that with the SUMIF function. Assuming that Column B holds the
    categories, and Column A holds the values, then the formula would look like
    this if you wanted the sum of all values in the Internet category:

    =SUMIF(B1:B7,"Internet",A1:A7)

    You would, of course, include all of the cells in your range, not just the
    first seven rows.

    Steph


    "[email protected]" wrote:

    > Hello Thanks for reading.
    >
    > I have 2 columns one has the Category and the other has the Time spent
    > Example:
    >
    > A1=15 B1=Email
    > A2=22 B2=Internet
    > A3=43 B3=Hardware
    > A4=23 B4=Internet
    >
    > You can see how cells B2 & B4 have the same category. What I would like
    > to do is add them both together to get the total for internet (or any
    > other category) so the result would be Internet = 45. I was thinking
    > about using an IF statement something like:
    >
    > IF A1=internet add the value of B1 to the total.
    >
    > It would need to know that if it was in cell A7 to add B7 to the list.
    > Any Ideas??
    >
    >


  3. #3
    Bernard Liengme
    Guest

    Re: Adding category totals

    Just the thing for SUMIF
    =SUMIF(B1:B4,"Internet",A1:A4)

    Or put the text "Internet" (sans quotes, of course) in D1, and the other
    categories in D2.....
    In E1 enter =SUMIF($B$1:$B$4,D1,$A$1:$A$4)
    Copy down the column

    If you have many categories, look in Help to learn about Pivot Tables and
    then come back with more questions
    best wishes

    --
    Bernard V Liengme
    www.stfx.ca/people/bliengme
    remove caps from email

    <[email protected]> wrote in message
    news:[email protected]...
    > Hello Thanks for reading.
    >
    > I have 2 columns one has the Category and the other has the Time spent
    > Example:
    >
    > A1=15 B1=Email
    > A2=22 B2=Internet
    > A3=43 B3=Hardware
    > A4=23 B4=Internet
    >
    > You can see how cells B2 & B4 have the same category. What I would like
    > to do is add them both together to get the total for internet (or any
    > other category) so the result would be Internet = 45. I was thinking
    > about using an IF statement something like:
    >
    > IF A1=internet add the value of B1 to the total.
    >
    > It would need to know that if it was in cell A7 to add B7 to the list.
    > Any Ideas??
    >




  4. #4
    Ron Coderre
    Guest

    RE: Adding category totals

    This might be a good time to learn a bit about Pivot Tables (if you haven't
    already used them)

    You'll need column titles:
    Examples:
    A1: TimeSpent
    B1: Category

    <Data><Pivot Table>
    Use: Excel
    Select your data
    Click the [Layout] button

    ROW: Drag the Category field here
    DATA: Drag the TimeSpent field here
    If it doesn't list as Sum of TimeSpent...dbl-click it and set it to Sum
    Click [OK]
    Select where you want the Pivot Table...and you're done!

    That will list each Category and the Sum of TimeSpent.

    To refresh the Pivot Table, just right click it and select Refresh Data

    Is that something you can work with?
    ***********
    Regards,
    Ron

    XL2002, WinXP


    "[email protected]" wrote:

    > Hello Thanks for reading.
    >
    > I have 2 columns one has the Category and the other has the Time spent
    > Example:
    >
    > A1=15 B1=Email
    > A2=22 B2=Internet
    > A3=43 B3=Hardware
    > A4=23 B4=Internet
    >
    > You can see how cells B2 & B4 have the same category. What I would like
    > to do is add them both together to get the total for internet (or any
    > other category) so the result would be Internet = 45. I was thinking
    > about using an IF statement something like:
    >
    > IF A1=internet add the value of B1 to the total.
    >
    > It would need to know that if it was in cell A7 to add B7 to the list.
    > Any Ideas??
    >
    >


+ 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