+ Reply to Thread
Results 1 to 6 of 6

Match function with #N/A error

  1. #1
    Registered User
    Join Date
    05-06-2014
    Location
    Chico
    MS-Off Ver
    Excel 2007
    Posts
    2

    Match function with #N/A error

    problem.png

    on D21, I put =MATCH(E17,B1:B41,1) to find cell that has less than value of 30. but it keeps giving me #N/A error. Funny thing is it gives 40 when I put -1 for match type. It makes sense if it looked for first smallest value more than 30.


    I have no idea why this isn't working. I just wanted to look for the value less than 30, whether the result is value or cell address. What have I done wrong?
    Attached Images Attached Images

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,530

    Re: Match function with #N/A error

    I think you'll find the values have to be in ascending sequence if you want the value lower when not using an Exact Match


    A
    B
    C
    D
    E
    1
    Value
    Search for:
    In Row …
    2
    0
    2
    2
    =MATCH($C2,$A$1:$A$17,1)
    3
    5
    4
    2
    4
    10
    6
    3
    5
    15
    8
    3
    6
    20
    10
    4
    7
    25
    12
    4
    8
    30
    14
    4
    9
    35
    16
    5
    10
    40
    18
    5
    11
    45
    20
    6
    12
    50
    22
    6
    13
    55
    24
    6
    14
    60
    26
    7
    15
    65
    28
    7
    16
    70
    30
    8
    17
    75
    32
    8
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Match function with #N/A error

    Can there be more than one value less than 30? Are you wanting to return the value or the address of the value?

    Could the solution be as simple as this. Enter this formula in C16 and copy down to list all values less than E16:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by newdoverman; 05-06-2014 at 11:13 AM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  4. #4
    Registered User
    Join Date
    05-06-2014
    Location
    Chico
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Match function with #N/A error

    hmm. then what function should I use for the these values? should I just copy and sort data?

  5. #5
    Registered User
    Join Date
    05-06-2014
    Location
    Chico
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Match function with #N/A error

    oh then it will determine whether the cell has less value than 30.

    well I was about to copy the data and sort it out in orders, but I think your is way better.

    thanks.
    Last edited by dhkdeoen; 05-06-2014 at 11:09 AM.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,530

    Re: Match function with #N/A error

    In the previous example, if 30 was not in the table, the MATCH would find the next lower value.

    See the example below:


    A
    B
    C
    D
    E
    F
    G
    1
    Value
    Search for:
    In Row …
    2
    0
    2
    8
    =MATCH(30,$A$1:$A$17,1)
    29
    =INDEX($A$1:$A$17,MATCH(30,$A$1:$A$17,1))
    3
    5
    4
    2
    =MATCH($C3,$A$1:$A$17,1)
    0
    =INDEX($A$1:$A$17,MATCH($C3,$A$1:$A$17,1))
    4
    10
    6
    3
    5
    5
    15
    8
    3
    5
    6
    20
    10
    4
    10
    7
    25
    12
    4
    10
    8
    29
    14
    4
    10
    9
    35
    16
    5
    15
    10
    40
    18
    5
    15
    11
    45
    20
    6
    20
    12
    50
    22
    6
    20
    13
    55
    24
    6
    20
    14
    60
    26
    7
    25
    15
    65
    28
    7
    25
    16
    70
    30
    8
    29
    17
    75
    32
    8
    29
    18
    80
    30
    8
    29

+ 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] Vlookup to Pivot Table, using Match function, returns error if can't find match value
    By AndrewHowarth in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-16-2015, 12:10 AM
  2. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  3. Error with Match function
    By joshuar in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 08-08-2011, 11:59 AM
  4. Match Function Error
    By subtilty in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-16-2010, 08:23 AM
  5. Match Function Error
    By aki096 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-09-2009, 05:22 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