+ Reply to Thread
Results 1 to 9 of 9

Visible 'greater than but less than' formula.

  1. #1
    Registered User
    Join Date
    04-13-2017
    Location
    UK
    MS-Off Ver
    2010
    Posts
    20

    Visible 'greater than but less than' formula.

    Hi, I'm new on here. I have no excel training but I've just tried to self-teach along the way. Now I'm stuck! If anyone could help I'd be very grateful.
    I have a formula which I know works:
    =SUMPRODUCT(SUBTOTAL(2,OFFSET(I5:I627,ROW(I5:I627)-ROW(I5),0,1)),--(I5:I627=1))
    This counts the number of visible entries in a filtered column that are equal to the value '1'.

    I tried to adapt this to row H & wanted to count the number of visible entries (after filtering) that were greater than 1, but less than 2, so I tried;
    =SUMPRODUCT(SUBTOTAL(2,OFFSET(H5:H627,ROW(H5:H627)-ROW(H5),0,1)),--(H5:H627>1.0,H5:H627<2.0))
    What have I done wrong?
    Thanks,
    Crabman9

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Visible 'greater than but less than' formula.

    Its somewhat a mega formula and could not be handled in imagination. Please upload a sample workbook with desensitized data .Put desired results manually.
    Teach me Excel VBA

  3. #3
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Visible 'greater than but less than' formula.

    Welcome to the forum!

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    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.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Visible 'greater than but less than' formula.

    try

    =SUMPRODUCT(SUBTOTAL(2,OFFSET(H5:H627,ROW(H5:H627)-ROW(H5),0,1)),--(H5:H627>1)*(H5:H627<2))

  5. #5
    Registered User
    Join Date
    04-13-2017
    Location
    UK
    MS-Off Ver
    2010
    Posts
    20

    Re: Visible 'greater than but less than' formula.

    John, you're a star. That tiny little asterisk eh? Thank you also, Ali & Imran, I was in the process of preparing the spreadsheet for you when John rifled home from 30 yards. Thanks all,
    crabman9

  6. #6
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Visible 'greater than but less than' formula.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Registered User
    Join Date
    04-13-2017
    Location
    UK
    MS-Off Ver
    2010
    Posts
    20

    Re: Visible 'greater than but less than' formula.

    Will do, thanks again.

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Visible 'greater than but less than' formula.

    @crabman9:

    FYI: The asterisk ("*") is used for an AND condition and a plus ("+") used for an OR condition: probably most seen in SUMPRODUCT formulae (one of my "favourite" functions as it is very versatile).

    Glad it is fixed.

  9. #9
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Visible 'greater than but less than' formula.

    You are welcome. And yes John is a among the stars of the forum.

+ 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] Shorten IF/ElseIF statement when making Items visible/not visible
    By DHFE in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-11-2015, 11:29 AM
  2. Formula to count number of visible rows, and formula to count visible blanks
    By radoncadonc in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-28-2015, 04:19 PM
  3. Select visible range and add page break after every 20th visible cell
    By tuc47285 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-04-2015, 01:18 AM
  4. Replies: 4
    Last Post: 01-06-2014, 02:14 AM
  5. Table Object after filtering - Count visible rows & First visible row
    By limalf in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-13-2013, 07:29 PM
  6. Replies: 2
    Last Post: 06-20-2012, 12:22 PM
  7. Resize Visible Rows based only on Visible Columns text
    By Zimbo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2009, 10:55 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