If-then-else construction in Excel formula

if (a1 = 1 && b1 = 2)
{
c1 = 1;
}
elsif (a1 =2 && b1 = 3)
{
c1 = 2:
}

I tried to get the above in an Excel formula for field C1:

=IF((A1=1)*AND(B1=2);1;*OR(IF((A1=2)*AND(B1=3);2;999)))

It doesn’t work. Somebody any idea?

Problem solved.

=IF(AND(A1=1;B1=2);“1”;IF(AND(A1=2;B1=3);“2”;IF(AND(A1=3;B1=4);“3”;IF(AND(A1=4;B1=5);“4”))))

Case closed.

=ALS(EN(A1=1;B1=1);1;ALS(EN(A1=2;B1=3);2))
With English version of Excel:
als = if
en =and

Edit:

This is an English forum, no Dutch allowed!
Edited it for you this time.

those parenthesis will get you every time :frowning:

i want to construct a formula.

CALCULATE THE TAX BASED ON 0.85% OF CURRENT SALARY IF CURRENT SALARY MORE THAN 25000.

how to construst above formula using IF.
can anyone help me?

is it possible for Excel to convert digits to words? for example 1,000.00 to One Thousand?

[QUOTE=seiwakai5378;2111004]is it possible for Excel to convert digits to words? for example 1,000.00 to One Thousand?[/QUOTE]

Yes it is.

=IF(A1=1000,“One Thousand”,"")

Is it possible to use a “if/then” formula to reference and list the contents another cell?
ie: =if a1=x then b1 = c1