+ Reply to Thread
Results 1 to 5 of 5

Help with SUMIF formula

  1. #1
    Registered User
    Join Date
    02-25-2020
    Location
    Malmö, Sweden
    MS-Off Ver
    Office 365
    Posts
    3

    Help with SUMIF formula

    I have a SUMIF-formula which I need some help with. The formula is SUMIF(T7:T128);"=1") but I would like to add a statement that if a cell in column T (for example T99) and that cell has an "1" in it but is preceded by a cell, on the same row, with an "1" in it in the previous column (in this case cell S99 the "1" in cell T99 should not be counted. How do I write that formula (hope my questions makes sense).

    Kind regards,

    Hans

  2. #2
    Registered User
    Join Date
    07-02-2013
    Location
    Cheshire
    MS-Off Ver
    Office Professional 2007
    Posts
    79

    Re: Help with SUMIF formula

    Hello and welcome to the forum. If I read your question correctly, this formula should do it:
    =SUMIF(T7:T128,"=1")-SUMIFS(S7:S128,S7:S128,"=1",T7:T128,"=1")
    It's worth thinking about if you want sumif or countif - what happens if a 2 is in column T?
    Last edited by maclearyj; 02-25-2020 at 10:28 AM.

  3. #3
    Registered User
    Join Date
    02-25-2020
    Location
    Malmö, Sweden
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Help with SUMIF formula

    Hi maclearyj

    Many thanks for your suggestion. Will try it out to see if it works. Regarding your question, it can only be a "1".

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Help with SUMIF formula

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    02-25-2020
    Location
    Malmö, Sweden
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Help with SUMIF formula

    It worked perfectly! Many thanks for your help.

+ 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. [SOLVED] My formula sumif/indirect formula is working perfect..except everything is 1 row off!
    By Nyolls in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-23-2015, 01:12 PM
  2. SumIf formula or Sumif with pivottable combined question
    By mcgleeuw in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2015, 01:05 PM
  3. Replies: 2
    Last Post: 09-16-2014, 10:13 AM
  4. [SOLVED] Shorten SUMIF + SUMIF + SUMIF each with same reference range but different criteria???
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2014, 09:25 PM
  5. SUMIF or SUMIF's formula with multiple criteria
    By jackiemariee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2013, 06:19 PM
  6. SumIF formula with criteria is Text inside a Formula?
    By excellentlearner in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-25-2012, 06:40 PM
  7. SUMIF formula that is collects values from an IF formula
    By stanja in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-26-2009, 02:37 PM

Tags for this Thread

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