+ Reply to Thread
Results 1 to 7 of 7

Looking for formula that involves 2 columns

Hybrid View

  1. #1
    Registered User
    Join Date
    03-31-2007
    Posts
    21

    Looking for formula that involves 2 columns

    I attached the sheet which explains what I am attempting to do
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    01-24-2009
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    61

    Re: Looking for formula that involves 2 columns

    =sumif(f2:j13,f2,j2:j13)

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,060

    Re: Looking for formula that involves 2 columns

    You should only refer to one column in the criteria range:
    =SUMIF(F2:F13,F2,J2:J13)
    or if you specifically want Pat:
    =SUMIF(F2:F13,"Pat",J2:J13)
    for example.
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Registered User
    Join Date
    03-31-2007
    Posts
    21

    Re: Looking for formula that involves 2 columns

    Quote Originally Posted by romperstomper View Post
    You should only refer to one column in the criteria range:
    =SUMIF(F2:F13,F2,J2:J13)
    or if you specifically want Pat:
    =SUMIF(F2:F13,"Pat",J2:J13)
    for example.
    I did forget to mention that the result in the above formula (which works) eventually gets divided by another cell Ex:=SUMIF(F2:F13,"Pat",J2:J13)/N6
    If the value in N6 is 0 I get the /DIV0! error

    What I can I add to the above formula to hide the error

    Thanks

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,060

    Re: Looking for formula that involves 2 columns

    Depends what you want returned:
    =IF(N6=0,"",SUMIF(F2:F13,"Pat",J2:J13)/N6)
    for example.

  6. #6
    Registered User
    Join Date
    01-24-2009
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2003, 2007
    Posts
    61

    Re: Looking for formula that involves 2 columns

    =IFERROR(SUMIF(F2:J13,F2,J2:J13)/N6,"nil")
    you may substitute any text or number for the word "nil" like 0, or even empty space for which you have to give "".

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,060

    Re: Looking for formula that involves 2 columns

    Note that IFERROR does not exist in versions prior to 2007. You would need to use:
    =IF(ISERROR(formula),"error value",formula)

+ 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