formula error

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

The following formula is looking for "CSR" in either Col.
D, E, or F.

=IF(D3="CSR","CSR",IF(E3="CSR","CSR",IF(F3="CSR","CSR","NO
MATCH")))

What it is trying to do is if it finds "CSR" in any of the
3 columns, it should put "CSR" in Col. C.

It works great if "CSR" is in Col. D but I'm getting a
(#N/A) error in Col. C if "CSR" is in either Col. E or F.

Can anyone help and tell why it won't put "CSR" in Col. C
if it finds it in Col. E or F.

Thanks for the help.
 
Mike,

It works fine for me, although it can be better written as

=IF(OR(D3="CSR",E3="CSR",F3="CSR"),"CSR","NO MATCH")

--

HTH

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

If you have a formula in D3 which produces #N/A this will carry through
to your new formula. Try re-making your formula as follows

=IF(ISNA(Your_Current_Formula), "", Your_Current_Formula)

Then D3 will not produce a #N/A to mess up your next formula.

Dan E
 
If you have a formula in D3 which produces #N/A this will carry through
to your new formula. Try re-making your formula as follows

=IF(ISNA(Your_Current_Formula), "", Your_Current_Formula)

Then D3 will not produce a #N/A to mess up your next formula.
...

Too redundant. Simpler to use

=IF(COUNTIF(D3:F3,"CSR"),"CSR","NO MATCH")

which also ignores any #N/A's in the D3:F3 range.
 
Back
Top