What Does It Do?
The IF function in excel is used to perform a logical test. If the test is true, it changes as said, and same with if it is false.
How To Use
The format of the IF function is =IF(logical_test, value_if_true, value_if_false). To use the IF function, you click on any cell and enter "=IF". From there, you can either put a left parenthesis and enter the 3 components with a comma in between each and a right parenthesis at the end OR you can click the function button in between the check mark and formula bar, click OK, and enter the 3 components in the space provided for each part. When using words in the true and false part, put quotation marks around the word/words.
Parts Of The Function
The logical test part of the function is what you are testing to be true or false. The true part of the function is what excel will replace the cell with if the logical test is true. The false part of the function is what excel will replace the cell with if the logical test is false.
Omitting True or False
The true and false part of the function are optional, but there are things to remember when leaving them out. For example, when using only the logical test and true part, if you enter =IF(A1<10, "Good",) and the function is false, excel will enter a zero. If you put =IF(A1<10, "Good",""), excel will leave the cell blank or delete what was previously in the cell.
Why To Use
The IF function can be used for budgets, inventory, status, and many other things.
In Google Sheets, the IF function works the same way as it does in Excel. The only difference in the two is the function has to be typed inside the cell instead of having the choice of typing in the cell or using the function button to type it in the pop up box. Google Sheets also gives an example when you type in =IF( or type =IF and click on the IF function.