+ Reply to Thread
Results 1 to 4 of 4

Formula to add column amounts unless cell is blank then add number in a different column

  1. #1
    Registered User
    Join Date
    05-29-2019
    Location
    U.S.A
    MS-Off Ver
    Office 365
    Posts
    2

    Question Formula to add column amounts unless cell is blank then add number in a different column

    I believe that Excel can do everything but this one has me stumped. I am a self-taught Excel user (so be patient). I've been struggling with this for a whole week.

    Here are the 2 things I am trying to accomplish in the attached file
    1) Column H Formula: sum the totals in column G unless it is empty. If it is empty then use the amount in column F.
    2) Column J Formula: same as the above EXCEPT it should only add the totals if there is an "x" in column I.

    Am I asking too much of Excel?

    I am also open to other suggestions of collecting this data.

    TIA
    Attached Files Attached Files
    Last edited by utahwilkinsons; 05-31-2019 at 10:49 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,717

    Re: Formula to add column amounts unless cell is blank then add number in a different colu

    Welcome to the forum!

    How about this for G?

    =SUM(G:G)+SUMIF(G:G,"",F:F)

    And for the other:

    =SUMIF(I:I,"x",G:G)+SUMIFS(F:F,G:G,"",I:I,"x")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Formula to add column amounts unless cell is blank then add number in a different colu

    In H4:
    Please Login or Register  to view this content.
    In J4:
    Please Login or Register  to view this content.
    These are array formulas, so they must be input with CTRL+SHIFT+ENTER not just ENTER key.

    Also, avoid putting merged cells in any sort of formula chain; they should really only be used for table superheadings and stuff.
    Click the [* Add Reputation] Button to thank people for help!
    Post Attachment: Click [Go Advanced] under the reply box; then click [Manage Attachments] to launch the attachments dialogue.
    Mark Thread Solved: Go to the top of the first post; Select [Thread Tools] dropdown; Pick the [Mark thread as Solved] option.

  4. #4
    Registered User
    Join Date
    05-29-2019
    Location
    U.S.A
    MS-Off Ver
    Office 365
    Posts
    2

    Red face Re: Formula to add column amounts unless cell is blank then add number in a different colu

    AliGW Thank you so much - your formulas worked perfectly!

    ben-hensel Thank you for replying. I saw AliGW's email first so I did not try your formula but I appreciate your tip about merged cells.

    I knew that Excel could do this - it seems like it can do anything!!

+ 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. Replies: 8
    Last Post: 10-10-2018, 11:59 AM
  2. [SOLVED] Formula Index Column to find first blank cell and sum cells in different Column
    By Hood in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-18-2017, 07:57 PM
  3. [SOLVED] need formula to this logic, A column number B column blank then C column desired name
    By vengatvj in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-02-2013, 10:30 PM
  4. Replies: 13
    Last Post: 09-19-2013, 06:54 PM
  5. [SOLVED] Need to insert a number into the next blank cell in a column
    By Pete the excel noob in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2013, 02:21 AM
  6. Replies: 6
    Last Post: 03-04-2013, 11:25 AM
  7. [SOLVED] C# programming - Getting number of last non-blank cell (column) in a row.
    By Paddy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2005, 06:45 PM

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