+ Reply to Thread
Results 1 to 5 of 5

IF Function - Avoiding cells with text to find sum

  1. #1
    Registered User
    Join Date
    03-05-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    IF Function - Avoiding cells with text to find sum

    Hey all,

    I'm trying to find the sum across two columns of information.

    Column A contains cells that either contain text or numerical value.
    Column B contains either blank cells or numerical value.
    Column C would contain the sum.

    This is a two part problem for me:

    1) I want to find the sum of both columns if both columns have numerical values within them.
    2) But if Column A has text in the cell, then I want the value of Column B to translate over to Column C.

    For the first problem, I am using: =IF([@[ColumnA]]>0&[@[ColumnB]]>0,SUM([@ColumnA]]+[@[ColumnB]]),[@[ColumnB]])
    This finds the value of both columns if they both contain numbers. But if Column A does contain text, then I'm receiving #value.

    Any help is much appreciated!

  2. #2
    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,933

    Re: IF Function - Avoiding cells with text to find sum

    Hi welcome to the forum

    aa...1...1
    3...2...5
    4...bb...4

    SUM(A1:B1) copied down works for me?

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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

  3. #3
    Registered User
    Join Date
    03-05-2015
    Location
    USA
    MS-Off Ver
    2013
    Posts
    7

    Re: IF Function - Avoiding cells with text to find sum

    Wow I can't believe the ":" between columns did it. Thank you!
    Attached Files Attached Files

  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,933

    Re: IF Function - Avoiding cells with text to find sum

    ":" (without the "") is used to define a range, so if the range goes from A1 to J10, it would be defined as A1:J10, or, in your case E5:F5

    I see you are using what is called a Structured Table. These can be very useful and do some automatic stuff for you, but if you are not very familar with formula syntax and structures, that can make things overly confusing.

    For instance, in a non-structured table - ie just any old table of rows and columns that you put together - you sould use this formula...
    =SUM(E5:F5)

    But in a structured table (like you have), that same formula becomes...
    =SUM(Table1[[#This Row],[Lbs. Leftover]:[Yield - lbs.]])

    You can still use Structured Tables with the "simpler" formula, you just have to type in in yourself, instead of using the mouse

  5. #5
    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,933

    Re: IF Function - Avoiding cells with text to find sum

    Thanks for the feedback

+ 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] Avoiding text in an array formula when using the SUM function
    By mwhelan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2014, 04:08 AM
  2. Avoiding double-count of cells with similar text
    By MJCharaf in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-10-2013, 11:23 AM
  3. Help avoiding error in this range find macro.....
    By matador_24 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2012, 05:19 PM
  4. Avoiding a Nesting If function
    By dumpster1985 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-29-2011, 04:53 AM
  5. Avoiding Cells
    By SamuelT in forum Excel General
    Replies: 2
    Last Post: 11-11-2005, 07:18 AM

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