Wrong data type error in a simple array formula

DavidSCowan

Board Regular
Joined
Jun 7, 2009
Messages
78
Could somebody help please this is driving me mad! I am trying to use FIND and an array formula to find the position of text in a range of cells (A2 and A3 in the example) which could be one of a number of options (C1:D1 here). But the array formula throws up the following error: "A value used in the formula is of the wrong data type". The simplest illustration of the problem is as follows. The formula in B2 is
Code:
{=FIND(($C$1:$D$1),A2)}
and $C$1:$D$1 contain REF and ATM respectively. [/CODE][TABLE="width: 562"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD] REF[/TD]
[TD] ATM[/TD]
[/TR]
[TR]
[TD]203047 05AUG 08.55 OKEHAMPTON ATM[/TD]
[TD="align: center"]#VALUE![/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CO-OP GROUP 380611 REF 191 7553375222 BCC[/TD]
[TD="align: right"]22[/TD]
[TD] [/TD]
[TD]We see that B2 has a #VALUE! error - wrong data type. But for some reason B3 is ok returning 22! Any thoughts greatly appreciated. PS for some reason I can't type this properly!![/TD]
[/TR]
</tbody><colgroup><col><col span="3"></colgroup>[/TABLE]
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,223,214
Messages
6,170,771
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