+ Reply to Thread
Results 1 to 7 of 7

Need Help understanding Formula.

  1. #1
    Registered User
    Join Date
    04-06-2016
    Location
    California
    MS-Off Ver
    2013
    Posts
    4

    Need Help understanding Formula.

    I recently came across a formula and I can't figure out what it actually does. I was wondering if someone could help me out.

    =SUMPRODUCT((H2>$H$1:$H$1000)+0)+1

    $H$1:$H$1000 - The entire column contains text.

    Thanks in advance for your help!!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Need Help understanding Formula.

    Hi BlackAtlas and welcome to the forum,

    The formula counts the number of cells that are alphabetically greater than what is in H2.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-06-2016
    Location
    California
    MS-Off Ver
    2013
    Posts
    4

    Re: Need Help understanding Formula.

    Thanks for the quick reply. I'm new still new to Excel and I'm still a little confused. After reading your reply I simplified (a little) the formula to read: =SUMPRODUCT((H1>$H$1:$H$10)+0)+1

    $H$1:$H$10 - Contains letters A through J in that order.

    The formula is in I1:I10
    The Formula returns:

    5,6,7,8,9,10,11,1,1,1

    Can you explain these values?

    Thanks Again.

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

    Re: Need Help understanding Formula.

    No, because the formula you've written won't output the range you've given.

    H1 > H1:H10

    This checks whether the first term (H1) is greater than whatever is in H1:H10 and returns TRUE or FALSE (by default this will only check the first term in the range though)

    (TRUE)+0

    adding zero to a boolean forces it to be assessed as a number, 1 for TRUE and 0 for FALSE

    SUMPRODUCT will add up the assessments for every value in the range, eg, it will check whether H1 is greater than H1 and add one if it is / zero if it isn't, then it will check if H1 is greater than H2, than H1>H3, etc.

    The +1 on the end just increases the value by one.

    So what this formula should be outputting (verified by my testing) is 1 for H1>H1:H10 in cell I1, then 2 for H2>H1:H10 in cell I2, etc. counting up 1,2,3,...,9,10 in cells I1:I10

    So I don't know how you're getting the offset range starting at 5,6,7 that you're listing as output; the formula you gave shouldn't be producing that.
    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.

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Need Help understanding Formula.

    Let me try again...

    the H1>$H$1:$H$10) returns a bunch of True/False terms to if H? > all the stuff in $H$1:$H$10.

    The +0 turns the True to a 1 and the False to a zero.

    Then you add all these True (1) and False (0) together and add a 1 to the whole total so you never get a zero for an answer.

    The "Add Zero" trick turns True and False to numbers so you can add them together.

    I hope that makes more sense.

  6. #6
    Registered User
    Join Date
    04-06-2016
    Location
    California
    MS-Off Ver
    2013
    Posts
    4

    Re: Need Help understanding Formula.

    That makes perfect sense. As soon as I read True/False it hit me like a ton of bricks. I can't believe I didn't consider that. Thanks for your help I really appreciate it.

  7. #7
    Registered User
    Join Date
    04-06-2016
    Location
    California
    MS-Off Ver
    2013
    Posts
    4

    Re: Need Help understanding Formula.

    Sorry for the confusion.

    Looks like I made a mistake (Posting the wrong output) while trying to work out what the formula did. That was just one of the many outputs I got in the process.. I didn't know what it was supposed to look like so I didn't realize it was wrong.

+ 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. Understanding a formula
    By mbauman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-12-2015, 02:03 PM
  2. Help understanding a formula
    By excel0124 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-15-2013, 02:56 PM
  3. I need help understanding this formula
    By exfin in forum Excel General
    Replies: 3
    Last Post: 09-23-2012, 03:13 PM
  4. Understanding formula
    By stu182 in forum Excel General
    Replies: 1
    Last Post: 02-05-2008, 09:22 AM
  5. NOT UNDERSTANDING THE FORMULA
    By PAPABEAR2252 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2005, 08:07 PM
  6. [SOLVED] Understanding a formula
    By Jordan in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-26-2005, 05:15 PM
  7. [SOLVED] Understanding this formula
    By Sal in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-26-2005, 03:06 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