HELP! Please!

D

DCM84

Hi, I kno this is not a programming query but im a beginner with M
Excel and cant work out why this formula isnt workin! Here goes:

=IF(NOT(ISERROR(MATCH(A1,ValidData,0))),"IIBD ACC","INVALID CAUSE OR P
CODE"),IF(NOT(ISERROR(MATCH(A1,ValidData2,0))),"IIBD PD","invalid caus
code")

ValidData is cells H1:H4
ValidData2 is cells I1:I4

this is essentially two IF Statments combined so maybe ive done i
wrong?

Id be really really greatful if anyone can help

Thanx loads,
DCM8
 
J

Jeffrey Marcellus

Hi, you need to remove the bracket from after PD CODE" in order to make the
2nd if statement an else.
Jeff
 
B

Bob Phillips

Indeed you have.

The first IF resolves completely, as you have both TRUE and FALSE actions,
so you cannot have another IF after this. A second IF should go in place of
either the TRUE or FALSE action.

Maybe this

=IF(NOT(ISERROR(MATCH(A1,ValidData,0))),"IIBD
ACC",IF(NOT(ISERROR(MATCH(A1,ValidData2,0))),"IIBD PD","invalid cause
code"))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
D

DCM84

Thanx bob, that worked great!

Only thing is, I realised now that i want to use another two I
statements for the formula that i had 4got to include! Is it possibl
to combine four IF statements together?

I tried using the same principal you gave me on the original two I
statements but excel says i am missing a --) or a (.

Any ideas?

Thanx
DCM8
 
B

Bob Phillips

As ever, show us what you have got so far.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top