View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Franz Verga
 
Posts: n/a
Default IF statement question

Nel post
*KarenH* ha scritto:

Can someone translate the following IF statement for me?

=IF((A2<"")*(ISNA(MATCH(A2,$A$1:A1,0))),"A","B")

I'm confused abut the first part, specifically the asterisk
separating the two criteria.
Thanks!


Hi Karen,

The formula can be written also in this way:

=IF(AND((A2<""),(ISNA(MATCH(A2,$A$1:A1,0)))),"A", "B")

Its mean that:

IF A2<"" (i.e. A2 is not empty)

AND the value in A2 doesn't match the value in A1(the formula MATCH is used
to search the value in A2 in A1, if the two values are different, MATCH
function returns #N/A! error the formula ISNA convert the error in TRUE)

THEN write A in the cell the formula is written

ELSE write B in the cell.

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy