+ Reply to Thread
Results 1 to 5 of 5

if a:a (range) equals january and c:c equals gas then add g:g ($)

  1. #1
    BCOz
    Guest

    if a:a (range) equals january and c:c equals gas then add g:g ($)

    a:a has is a range of monthly purchases and c:c is which month purchased. I
    would like on a different sheet to calculate only those gas purchases in
    january (automatically).
    I tried this but did not succeed:

    =IF(AND(Transactions!A:A=A:A,Transactions!C:C="gasoline"),SUM(Transactions!G:G),0)

  2. #2
    Gary L Brown
    Guest

    RE: if a:a (range) equals january and c:c equals gas then add g:g ($)

    You want to sum on multiple criteria. You need an array formula.
    Check out Chip Pearson's website. Specifically...
    http://www.cpearson.com/excel/array.htm
    He gives an example of exactly what you want.

    HTH,
    --
    Gary Brown
    gary_brown@ge_NOSPAM.com
    If this post was helpful, please click the ''Yes'' button next to ''Was this
    Post Helpfull to you?''.


    "BCOz" wrote:

    > a:a has is a range of monthly purchases and c:c is which month purchased. I
    > would like on a different sheet to calculate only those gas purchases in
    > january (automatically).
    > I tried this but did not succeed:
    >
    > =IF(AND(Transactions!A:A=A:A,Transactions!C:C="gasoline"),SUM(Transactions!G:G),0)


  3. #3
    BCOz
    Guest

    RE: if a:a (range) equals january and c:c equals gas then add g:g ($)

    I have already setup to calculate the total for the year, but I only want for
    month by month. Is there not a way to say if a:a = jan and c:c = gas then
    total column g:g and ignore all other months.

    "BCOz" wrote:

    > a:a has is a range of monthly purchases and c:c is which month purchased. I
    > would like on a different sheet to calculate only those gas purchases in
    > january (automatically).
    > I tried this but did not succeed:
    >
    > =IF(AND(Transactions!A:A=A:A,Transactions!C:C="gasoline"),SUM(Transactions!G:G),0)


  4. #4
    Gary L Brown
    Guest

    RE: if a:a (range) equals january and c:c equals gas then add g:g

    Sorry, but if that excellent article by Chip hasn't explained it clearly to
    you, I don't think I can do better. Please go back and re-read his article.
    Sincerely,
    Gary Brown


    "BCOz" wrote:

    > I have already setup to calculate the total for the year, but I only want for
    > month by month. Is there not a way to say if a:a = jan and c:c = gas then
    > total column g:g and ignore all other months.
    >
    > "BCOz" wrote:
    >
    > > a:a has is a range of monthly purchases and c:c is which month purchased. I
    > > would like on a different sheet to calculate only those gas purchases in
    > > january (automatically).
    > > I tried this but did not succeed:
    > >
    > > =IF(AND(Transactions!A:A=A:A,Transactions!C:C="gasoline"),SUM(Transactions!G:G),0)


  5. #5
    JR
    Guest

    RE: if a:a (range) equals january and c:c equals gas then add g:g ($)

    I assume you are setup like this
    A B C
    25.00 Gas Jan
    So, what you could do in D is type =B1&C1 for the result "GasJan"...copy the
    formula down the page. On the other sheet, type "GasJan", or use a formula
    as above. Now all you have to do is use a SUMIF formula that "looks for"
    GasJan in col. D and sums col. A.
    "BCOz" wrote:

    > a:a has is a range of monthly purchases and c:c is which month purchased. I
    > would like on a different sheet to calculate only those gas purchases in
    > january (automatically).
    > I tried this but did not succeed:
    >
    > =IF(AND(Transactions!A:A=A:A,Transactions!C:C="gasoline"),SUM(Transactions!G:G),0)


+ 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