Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel MATCH() function always giving #N/A

Super simple match, looks like this:

=MATCH("Team", A1:A25,0)

The data in A1:A25 is imported from a text file. The cells are formatted as text.

If I go into the column and manually type "Team" into the cell that already says "Team", then it will work. But unless I manually type it in, it says #N/A.

What is wrong with this?

like image 880
elykl33t Avatar asked Jun 08 '14 20:06

elykl33t


People also ask

Why is my INDEX match returning value?

If you are using INDEX as an array formula along with MATCH in order to be able to retrieve a value, you will need to convert your formula into an array formula, otherwise you will see a #VALUE! error. Solution: INDEX and MATCH should be used as an array formula, which means you need to press CTRL+SHIFT+ENTER.

Why is my match formula in Excel not working?

If you believe that the data is present in the spreadsheet, but MATCH is unable to locate it, it may be because: The cell has unexpected characters or hidden spaces. The cell may not be formatted as a correct data type. For example, the cell has numerical values, but it may be formatted as Text.

How do you change the match function in Excel?

The MATCH function searches for a specified item in a range of cells, and then returns the relative position of that item in the range. For example, if the range A1:A3 contains the values 5, 25, and 38, then the formula =MATCH(25,A1:A3,0) returns the number 2, because 25 is the second item in the range.


2 Answers

One of the problems could be, that you have unwanted empty characters (I mean space) either before or after the word (so it is 'Team ' instead of 'Team'). Dirty workaround would be trimming text such as following:

{=MATCH("Team", TRIM(A1:A25),0)}

(Please make sure that you enter it as Array formula with Ctrl + Shift + Enter)

like image 97
Robert J. Avatar answered Oct 06 '22 15:10

Robert J.


Without seeing the data in A1:A25, here's what I would do as a test.

Insert a column B next to column A.

Cntl-Spacebar to highlight all of column B.

Make sure the field time is set to General, not text.

Then run a formula in column b: =trim(A1) and paste it down.

This will make sure the field is trimmed (i.e. there are no blank spaces at the end of the word).

This may fix your issue.

like image 37
Kevin Avatar answered Oct 06 '22 16:10

Kevin