+ Reply to Thread
Results 1 to 8 of 8

lookup a cell address with criteria value

  1. #1
    Registered User
    Join Date
    02-12-2009
    Location
    oslo, Norway
    MS-Off Ver
    Excel 2010
    Posts
    45

    lookup a cell address with criteria value

    When wanting to lookup the cell address of a value (ex 999)..

    I know from previous reading that the cell address of exact value is:
    =ADDRESS(MATCH((999),$A$1:A7,0),1)

    However, when editing to:
    ADDRESS(MATCH((999),$A$1:A7,-1),1)

    to get the cell address with value that is bigger than 999, i get an error

    Why?

    attached sheet shows the example
    Attached Files Attached Files
    Last edited by abrunstad; 03-27-2009 at 10:30 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: lookup a cell address with criteria value

    If you want the address of the first cell that is bigger than your indicated number then try:

    =ADDRESS(MATCH(TRUE,A1:A8>999,0),1)

    confirmed with CTRL+SHIFT+ENTER

    or

    =ADDRESS(MATCH(TRUE,INDEX(A1:A8>999,0),0),1)

    Confirmed normally with only ENTER
    Last edited by NBVC; 03-27-2009 at 10:39 AM.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

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

    Re: lookup a cell address with criteria value

    I can't look at your file as I do not have Excel 2007 but the 0 in the MATCH function states that values can be in any order. The -1 will only work if the values are sorted in decending order.
    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

  4. #4
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: lookup a cell address with criteria value

    read the description of MATCH function syntax below.
    what you are looking or, requires that the numbers are in descending order.
    See the attached example.
    modytrane
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: lookup a cell address with criteria value

    sorry, forgot to paste the syntax description.

    Match_type is the number -1, 0, or 1. Match_type specifies how Microsoft Excel matches lookup_value with values in lookup_array.

    If match_type is 1, MATCH finds the largest value that is less than or equal to lookup_value. Lookup_array must be placed in ascending order: ...-2, -1, 0, 1, 2, ..., A-Z, FALSE, TRUE.

    If match_type is 0, MATCH finds the first value that is exactly equal to lookup_value. Lookup_array can be in any order.

    If match_type is -1, MATCH finds the smallest value that is greater than or equal to lookup_value. Lookup_array must be placed in descending order: TRUE, FALSE, Z-A, ...2, 1, 0, -1, -2, ..., and so on.

    If match_type is omitted, it is assumed to be 1.

  6. #6
    Registered User
    Join Date
    02-12-2009
    Location
    oslo, Norway
    MS-Off Ver
    Excel 2010
    Posts
    45

    Re: lookup a cell address with criteria value

    Thanks for replys guys!

    there is still one problem,

    =ADDRESS(MATCH((1000),Produksjonplan!B13:CB13,-1),1)

    I am looking up in a single row, and many colums in another sheet (b13:cb13) in the sheet "produksjonsplan".
    is it he last 1-digit that now is my problem? :S

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: lookup a cell address with criteria value

    Should it be?

    =ADDRESS(13,MATCH((1000),Produksjonplan!B13:CB13,-1))

  8. #8
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: lookup a cell address with criteria value

    change your formula to:

    =ADDRESS(13,MATCH((1000),Produksjonplan!B13:CB13,-1))

    make sure the numbers are in descending order.

    modytrane

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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