+ Reply to Thread
Results 1 to 7 of 7

SUMPRODUCT or SUMIFS?

  1. #1
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    SUMPRODUCT or SUMIFS?

    Hi all,

    I was wondering whether someone can help me with the below.

    Basically as one can see from the attached I have two columns: Column A is made up of 'nominal codes' and Column B is made up of 'Amounts'

    I would like to make a formula which would sum all the amounts in column B, however, only those amounts which have a nominal code which starts with a '5', '6', '7', '8', '9'

    Thanks a lot, appreciate your kind help!

    Keibri
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: SUMPRODUCT or SUMIFS?

    Hi
    I would just add a helper column - C
    in C2
    =--Left(A2,1) and copy down. The "--" double unary minus converts text to numeric.
    Then to get the total it is just
    =SUMIFS($B$2:$B$144,$C$2:$C$144,">"&5)

    If you do have to use SUMIF, then it would be =SUMIF($C$2:$C$144,">"&5,$B$2:$B$144)

    I much prefer the layout of Sumifs, where ou give the range to be summed first, and can have multiple criteria follwoing.
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

  3. #3
    Registered User
    Join Date
    10-12-2015
    Location
    Bristol, UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: SUMPRODUCT or SUMIFS?

    Hi there.

    As your nominal codes column is formatted as numbers, you could use a simple formula like

    Please Login or Register  to view this content.
    However, if you anticipate having alpha characters in your nominal codes, then convert that column to Text format and you can use a more contrived formula like

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: SUMPRODUCT or SUMIFS?

    Or, without changing anything, you can use this formula:

    =SUMPRODUCT(B2:B144,--(--(LEFT(A2:A144))>=5))

    Change the 144 if your data may increase in length.

    Hope this helps.

    Pete

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SUMPRODUCT or SUMIFS?

    This
    =SUMIF(A:A,">50000000",B:B)
    But > would have to be >=

  6. #6
    Registered User
    Join Date
    10-12-2015
    Location
    Bristol, UK
    MS-Off Ver
    Office 365
    Posts
    39

    Re: SUMPRODUCT or SUMIFS?

    Good point @Jonmo1 thanks for spotting that!

  7. #7
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: SUMPRODUCT or SUMIFS?

    Cheers guys!!! Thanks a lot for your suggestions. All suggestions worked out smoothly!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SUMIFS or SUMPRODUCT
    By altajoy3 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-11-2017, 02:14 PM
  2. [SOLVED] Help with SUMIFS or SUMPRODUCT
    By Dan_Ludwig in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-24-2015, 09:35 AM
  3. [SOLVED] Sumproduct or Sumifs
    By adamsc57 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-15-2015, 09:10 PM
  4. sumifs or sumproduct
    By goodboy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-10-2013, 09:53 AM
  5. Sumifs or sumproduct ?
    By mlomagno in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-30-2012, 11:16 AM
  6. [SOLVED] SUMIFS to SUMPRODUCT
    By JungleJme in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-13-2012, 12:14 PM
  7. Sumifs Vs Sumproduct
    By _Lewis in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-21-2010, 11:28 AM

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