+ Reply to Thread
Results 1 to 14 of 14

Finding LAST cell lower than value

  1. #1
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    673

    Finding LAST cell lower than value

    Hi all, I have a row of data - say in ROW 15.

    This starts in column AD and goes to column BZ

    In each cell there are values. I want to return the column number of the LAST cell where the value is less than 1.6

    Anyone able to assist?

  2. #2
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    673

    Re: Finding LAST cell lower than value

    Sorry, should also add that the value needs to be less than 1.6 but not blank / zero

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    Excel 2010 on Linux - O365
    Posts
    12,509

    Re: Finding LAST cell lower than value

    Please post a sample sheet ( yellow banner)

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    59,097

    Re: Finding LAST cell lower than value

    Are you still using Excel 2007? If not, please update your profile. Thanks.
    Ali


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


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    59,097

    Re: Finding LAST cell lower than value

    Try this:

    =LOOKUP(2,1/($AD15:$BZ15>0)*($AD15:$BZ15<1.6),COLUMN(15:15))

    Sorry, should be this:

    =LOOKUP(2,1/(($AD15:$BZ15>0)*($AD15:$BZ15<1.6)),COLUMN(15:15))
    Last edited by AliGW; 07-25-2020 at 08:07 AM.

  6. #6
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Türkiye
    MS-Off Ver
    2010 - 64 Bit on Win7
    Posts
    939

    Re: Finding LAST cell lower than value

    I am not sure if i understood your question but, the following gives the last column number of the cell less then 1.6 with respect to column AD

    This is an array type formula which must be confirmed by Ctrl+Shift+Enter.

    Please Login or Register  to view this content.
    and the value of the cell is (again, array type formula):

    Please Login or Register  to view this content.
    Last edited by Haluk; 07-25-2020 at 07:58 AM.

  7. #7
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    673

    Re: Finding LAST cell lower than value

    Quote Originally Posted by Pepe Le Mokko View Post
    Please post a sample sheet ( yellow banner)
    Sample sheet attached - I have shown in yellow that the cell return should be ES15 which is column 120 starting from AD15
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    673

    Re: Finding LAST cell lower than value

    Quote Originally Posted by AliGW View Post
    Try this:

    =LOOKUP(2,1/($AD15:$BZ15>0)*($AD15:$BZ15<1.6),COLUMN(15:15))
    Hi, that just returns the last value - not the last one under 1.6

    And yes, I use Excel 2007

  9. #9
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    673

    Re: Finding LAST cell lower than value

    Quote Originally Posted by Haluk View Post
    I am not sure if i understood your question but, the following gives the last column number of the cell less then 1.6 with respect to column AD

    This is an array type formula which must be confirmed by Ctrl+Shift+Enter.

    Please Login or Register  to view this content.
    and the value of the cell is (again, array type formula):

    Please Login or Register  to view this content.
    Thanks, but those both give me N/A errors, and if possible I want to avoid Arrays

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    59,097

    Re: Finding LAST cell lower than value

    No, it returns the column number in the range:

    Excel 2016 (Windows) 32 bit
    C
    D
    E
    F
    G
    H
    I
    J
    K
    14
    1
    2
    3
    4
    5
    6
    7
    8
    15
    8
    1.6
    0
    1.2
    1.9
    1.3
    1.1
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    C
    15
    =LOOKUP(2,1/(($D15:$P15>0)*($D15:$P15<1.6)),COLUMN(15:15))
    Sheet: Sheet1

    EDIT:
    You need to check the parenthesis - sorry, I got it wrong in the original post.
    Last edited by AliGW; 07-25-2020 at 08:04 AM.

  11. #11
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    673

    Re: Finding LAST cell lower than value

    Quote Originally Posted by AliGW View Post
    No, it returns the column number in the range:

    Excel 2016 (Windows) 32 bit
    C
    D
    E
    F
    G
    H
    I
    J
    K
    14
    1
    2
    3
    4
    5
    6
    7
    8
    15
    8
    1.6
    0
    1.2
    1.9
    1.3
    1.1
    Sheet: Sheet1

    Excel 2016 (Windows) 32 bit
    C
    15
    =LOOKUP(2,1/(($D15:$P15>0)*($D15:$P15<1.6)),COLUMN(15:15))
    Sheet: Sheet1
    Hello, if you try that formula on my example sheet it gives 619 (which is the bast row). You will need to adjust the code as I missed the second "B" out in the range so it is BZB15

    Formula you have given as below gives value 619, which is the last value - not last value under 1.6

    Please Login or Register  to view this content.

  12. #12
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    59,097

    Re: Finding LAST cell lower than value

    Check the parenthesis.

    =LOOKUP(2,1/(($AD15:$BZ15>0)*($AD15:$BZ15<1.6)),COLUMN(15:15))

    I don't have your sheet ...
    You will need to adjust the code as I missed the second "B" out in the range so it is BZB15
    No, YOU need to adjust it to fit your required range.
    Last edited by AliGW; 07-25-2020 at 08:08 AM.

  13. #13
    Forum Contributor
    Join Date
    04-21-2009
    Location
    England
    MS-Off Ver
    Excel 2016
    Posts
    673

    Re: Finding LAST cell lower than value

    Thank you, your edited formula now works. Thank you very much
    Last edited by AliGW; 07-25-2020 at 08:09 AM. Reason: Please don't quote unnecessarily!

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    59,097

    Re: Finding LAST cell lower than value

    Administrative Note:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.

+ 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] Finding names beginning with lower case
    By Russet in forum Excel General
    Replies: 11
    Last Post: 08-09-2018, 09:25 AM
  2. Replies: 3
    Last Post: 09-24-2015, 06:46 AM
  3. Finding the closest-lower value in a range of data, using 2 variables
    By Vermili0n in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2015, 08:32 PM
  4. Finding a value within an upper and lower limit
    By bergii in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-15-2014, 05:05 PM
  5. copying a formula to 8 cells lower with a result of 1 cell lower
    By dyosa in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-21-2014, 11:52 PM
  6. Replies: 2
    Last Post: 05-31-2010, 03:23 PM
  7. Finding the maximun value lower than the maximun
    By brunces in forum Excel General
    Replies: 2
    Last Post: 04-28-2005, 08:19 AM

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