LEFT FUNCTION RESULT CANT READ BY MATCH

Copper Contributor

Hi, Would like to ask some assistance from here. I first did a formula for LEFT function and I got the correct value. But when i used that cell in my match function, it appears error.  I manually type the data without using the LEFT 

8 Replies

@Sandra_V670 

What are you trying to match with? A number or text?

@Sandra_V670 

One possible reason for this could be that the data types of the value returned by the LEFT function and the data in the array you are searching with the MATCH function do not match.

The LEFT function returns a text value, so if the array you are searching with the MATCH function contains numbers or dates, you may need to convert the text value returned by the LEFT function to a number or date using the VALUE or DATEVALUE functions before using it in the MATCH function.

 

Could you provide more details about your formula and the data you are working with?

HI @hans. Im trying to match a number but the cell is fomatted general
Does it need to be all in general? the code contains Letters and numbers and set as General.

@Sandra_V670 

Please include the following info to help others answer your question:

Welcome to your Excel discussion space!

Thank you @NikolinoDE . The look up value contains numbers and letters but when I apply the LEFT Formula, numbers will only be left as data.  The data format is in general.  I got the right value Im looking for after LEFT but when I do match function and uses the DATA reslt in my LEFT function, it appears error.

@NikolinoDE 

 

This is the sample code i need to match. 11005-Q-PC

 

First thing I did is to do a column for LEN function and I got a result of 10.

 

After LEN, I create a function of LEFT and I need to remove the -q-pc and I create a fomula like this. =LEFT(A2,N2-5)

=LEFT(11105-Q-PC,10-5)

result is 11005 ( the code is correct) 

Note all data are in general

 

After this, I need to match now and use the result of LEFT but it errors

 

 

 

@Sandra_V670 

Try this:

 

=--LEFT(A2,N2-5)

 

The -- convert the result of LEFT (which is text) to a number.