issue with Match formula

Eurekaonide

Active Member
Joined
Feb 1, 2010
Messages
433
Dear All
I have a formula in one cell which is doing this, =8260&RIGHT(F6,6) and returns say this as a result 8260159860 then next to it I have a formula stating =MATCH(X6,'sheet1'!C:C,0) but it returns an error - if I manually type in the number 8260159860 it returns a figure correctly - I have checked that all the formats are number and tried it on general too Ive checked for any spaces or funny characters but I just cant see why it would do this. I also tried doing and =(The cellB4) to try and reformat etc and this doesn't work either any ideas what is going wrong please? Many thanks as always
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
It appears that Col_C on Sheet1 contains numbers and your concatenation formula returns text.
Try either of these approaches:
Code:
=--(8260&RIGHT(F6,6))
or
Code:
=MATCH(--X6,Sheet1!C:C,0)

The double-minus coerces numeric text into numbers.
You could also: Add zero or multiply by 1, but the double-minus has only one purpose...to convert numeric text to numerics.

Does that help?
 
Upvote 0
When you're combining strings (RIGHT is a text function and returns a string) to other strings or numbers you'll always end up with a string. The easiest way to convert strings to numbers would be using the double negative.

If you want to check it out yourself type 8260159860 into a cell (A1) and your formula into another one (B1). Then check if A1=B1. Excel says they're not. Next check if A1=--B1 and you should get TRUE.
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top