IF function

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

hedrijw

Board Regular
Joined
Jun 17, 2002
Messages
210
IF(logical_test,value_if_true,value_if_false)

You can look this up in Help!
 

attc

Board Regular
Joined
Oct 11, 2002
Messages
87
=IF(NOT(FIND(answer,HELP)),"try mrexcel.com","try HELP first")

:)
This message was edited by attc on 2002-11-06 09:36
 

MarkVMcCullagh

Board Regular
Joined
Oct 22, 2002
Messages
72
=if(Condition,Result for meeting the condition, Result for not meeting the condition)

For example =if(4>3,"Larger","Not Larger")will display the result Larger in the cell
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
and one last thing...

combining IFs with IFs, ANDs and ORs

You can embed 7 IFs

=if(a=a,1,if(b=b,2,etc...

You can combine AND statements - therefore having 2 tests as opposed to the normal one

=if(And(a1=1,b1=2),"if both are true","if one or both are false)

and similarly with OR

=if(or(a1=1,b1=2),"if one is true","if both are false)
 

Forum statistics

Threads
1,143,614
Messages
5,719,719
Members
422,242
Latest member
hishamkhatri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top