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
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]
Code:
{=FIND(($C$1:$D$1),A2)}
<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]