+ Reply to Thread
Results 1 to 5 of 5

Including a Range in Formula, Less a Cell

  1. #1
    Registered User
    Join Date
    06-11-2015
    Location
    Victoria, BC Canada
    MS-Off Ver
    2010
    Posts
    24

    Including a Range in Formula, Less a Cell

    I have a formula with a range specified and it spans a series of cells in a column that is broken in the middle by a single cell (this cell contains text which is just there to aid the entering of information aka. a column header). If i include this text cell in the formula, it comes back blank. If I skip it in the range, it comes back blank.

    Here is the formula;

    =IFERROR(SUMPRODUCT(($E$51:$E$81<=165.1)*($M$51:$M$81)),"") - this works fine but does not include the entire range I want

    I tried something simple like;

    =IFERROR(SUMPRODUCT(($E$51:$E$81,$E$83:$E$92<=165.1)*($M$51:$M$81,$M$83:$M$92)),"") - this comes back blank

    Added section bolded.

    As you can see I am just trying to add a second range within the same function while skipping one header cell mid-range.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Including a Range in Formula, Less a Cell

    Try

    =IFERROR(SUMPRODUCT(--($E$51:$E$92,$E$83:$E$92<=165.1),($M$51:$M$92)),"")

    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    06-11-2015
    Location
    Victoria, BC Canada
    MS-Off Ver
    2010
    Posts
    24

    Re: Including a Range in Formula, Less a Cell

    Unfortunately no. It is still coming back blank. I am wondering if there is any way to ignore the header cell...

    Also what are the hyphens for/do?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Including a Range in Formula, Less a Cell

    Sorry, made a mistake in formula

    =IFERROR(SUMPRODUCT(--($E$51:$E$92<=165.1),($M$51:$M$92)),"")
    The -- changes the true/false value of $E$51:$E$92<=165.1 to 1 or 0
    I tested this and it works. When you use the comma instead of multiplying terms, it ignores text.

  5. #5
    Registered User
    Join Date
    06-11-2015
    Location
    Victoria, BC Canada
    MS-Off Ver
    2010
    Posts
    24

    Re: Including a Range in Formula, Less a Cell

    Very good! Works well. Thank you very much.

+ 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] Need a formula for a number range including a letter.
    By RecordTechCJ in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-14-2014, 09:40 PM
  2. Replies: 7
    Last Post: 03-28-2013, 04:47 PM
  3. [SOLVED] Including VBA code to copy filepath to cell range
    By kenadams378 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-18-2012, 07:22 AM
  4. [SOLVED] How to make a formula meet two criteria, including a range of different sheets
    By VivatMartin in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-21-2012, 04:51 AM
  5. Replies: 3
    Last Post: 04-09-2012, 02:53 PM
  6. activecell formula not including cell range text
    By jeskit in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-27-2011, 05:32 AM
  7. Replies: 9
    Last Post: 10-12-2010, 12:37 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