+ Reply to Thread
Results 1 to 7 of 7

If Column A>0 and Column B>0, Sum Column A?

  1. #1
    Registered User
    Join Date
    06-05-2011
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    3

    If Column A>0 and Column B>0, Sum Column A?

    Hi everyone, I am new to this forum (and making formulas) and hope that someone might be able to help with a formula I have been trying to create.

    I have been keeping a spreadsheet for the last few years of all my flight times and need to get specific totals from columns I already have. For example, I want totals of Dual XC Instruction received, however I do not have a specific column for that. What I was trying to do to get this total is if Column L (XC) has a value >0, and Column N(Dual) has a value >0, I want it to show the sum of Column L.

    This is what I came up with but it keeps giving an error.
    {=SUM(IF((L650:L676>0)*(N650:N676>0),L650:L676))}

    I attached a small example of what the spreadsheet looks like.

    Thanks in advance for any help.
    Attached Files Attached Files
    Last edited by Av8nGirl; 06-07-2011 at 10:32 PM.

  2. #2
    Forum Contributor
    Join Date
    05-27-2008
    Location
    Newcastle Upon Tyne UK
    MS-Off Ver
    XP Excel 2003
    Posts
    105

    Re: If Column A>0 and Column B>0, Sum Column A?

    The reason that you are getting an error is that you are including the column L that you are trying to amend. Can you use a helper cell?

    edvwvw

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If Column A>0 and Column B>0, Sum Column A?

    As you are using Excel 2007, you can utilize SUMIFS

    Try
    =SUMIFS(L650:L676,L650:L676, ">0", N650:N676, ">0")
    Does that work for you?
    Last edited by ChemistB; 06-07-2011 at 10:39 AM. Reason: arguments in wrong order oops
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: If Column A>0 and Column B>0, Sum Column A?

    Hello, use

    =SUMIF(N650:N676,">0",L650:L676)
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Registered User
    Join Date
    06-05-2011
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: If Column A>0 and Column B>0, Sum Column A?

    Quote Originally Posted by ChemistB View Post
    As you are using Excel 2007, you can utilize SUMIFS

    Try
    =SUMIFS(L650:L676,L650:L676, ">0", N650:N676, ">0")
    Does that work for you?
    Thanks! That worked and I was able to use the format for a few others that I needed.

    However, now I ran into the issue if I had 3 columns with an OR situation. Can that be done with SumIfs? If I can figure that out, then I think my spreadsheet will be finished Any help with be much appreciated.

    I attached another example of what I need for the formula below.

    If column E OR column F is >0, AND column N >0, then sum column N.
    Attached Files Attached Files

  6. #6
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If Column A>0 and Column B>0, Sum Column A?

    Try this

    =SUMPRODUCT(--(($E$4:$E$600+$F$4:$F$600)>0),$N$4:$N$600)

    Does that work for you?

  7. #7
    Registered User
    Join Date
    06-05-2011
    Location
    ny
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: If Column A>0 and Column B>0, Sum Column A?

    Quote Originally Posted by ChemistB View Post
    Try this

    =SUMPRODUCT(--(($E$4:$E$600+$F$4:$F$600)>0),$N$4:$N$600)

    Does that work for you?
    I think that works! Thank you so much

+ 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