Excel Functions for Data Analysis:
The Excel Function is a predefined operation that exists within Excel. Excel has various functions covering mathematics, statistics, finance, logical, and engineering formulas. Excel Functions are typed by "=" and the function name. We will discuss some of the important Excel Functions here.
SUM Function:
The SUM function is a predefined function, which adds numbers in a range. It is typed "=SUM". Select a cell to SUM. Type =SUM in required cell. Double-click the SUM command, then select a range and hit enter. For example, find the total charges of all patients.
COUNT:
The COUNT function is a premade function in Excel. It counts cells with numbers in a range. It is typed =COUNT. Select a cell to COUNT. Type =COUNTin required cell. Double-click the COUNT command, then select a range and hit enter. For example, count the number of patient IDs in this patient worksheet.
IF Function:
The IF function is a predefined logical function in Excel. It returns values based on a true or false condition. For example, in our patient worksheet, we wanted to have a column that recorded whether the patient had been discharged or not. We could add a new column (named Discharged?) to the right of the existing column and then enter the "IF" formula in cell I2.
After entering the IF formula click enter. We will get "YES" if the patient is discharged, otherwise "NO"
IF function returns true("Yes") in I2. We can then use the Fill handle to copy this formula down the column. Most of the cells said "Yes", but some didn't, i.e. patients not yet discharged.
IFS Function:
The IFs function is a predefined logical function in Excel. It returns values based on one or more true or false conditions. It is typed "=IFS". This function can replace multiple nested IF functions being used in a single formula.
For example, in our patient worksheet,
we wanted to have a column that recorded whether the patient charges are less than 10000, between 10000 and 50000, or more than 50000. We could add a new column (named Charges Range) to the right of the existing column and then enter the "IFS" formula in cell H2.
After entering the IFs formula click enter. We will get "Less" if the patient charges are less than 10000, or "Medium" if the patient charges are between 10000 and
50000, or "High" if patient charges are more than 50000.
IFs function returns true ("Less") in H2. We can then use the Fill handle to copy this formula down the column to see the range of all patients' charges.
AVERAGE:
The AVERAGE function is a predefined function, that calculates the average in a range. It is typed "=AVERAGE". It adds the range and divides it by the number of observations. Select a cell to AVERAGE. Type "=AVERAGE" in a required cell. Double-click the AVERAGE command, then select a range and hit enter. For example, find the average charges of the patient worksheet.
VLOOKUP:
VLOOKUP is one of the commonly used reference type functions in Excel. VLOOKUP stands for vertical lookup. It helps us find data referenced in a lookup table. It is a useful tool when we want to find something in a table or range by column. HLOOKUP which stands for horizontal lookup, looks for data by row instead.
VLOOKUP works by using a common shared key between the source data and the lookup data in the lookup table.
=VLOOKUP(I5,A2:G11,7,FALSE)
-->Where I5 is the lookup value, that is the value or word we are looking for
-->A2:G11 is the lookup table or range, that is the table array or range of cells that contains the lookup value.
-->7 is the lookup column number, that is the number of the column in the lookup table that contains the value you are looking for.
-->FALSE is an optional parameter that determines whether the match is found to be exact, denoted by FALSE, or can be approximate, denoted by TRUE.
For example, using VLOOKUP we will find a particular patient’s (Vinoth Pandian) hospital charges.
We can then use the Fill handle to copy this formula down the column to see the remaining patients' charges.
MAX:
The MAX function helps to find the highest number or value in a range. It is typed "=MAX". It will only work for cells with numbers. This function ignores cells with text. For example, we will find the maximum charges for this patient worksheet.
MIN:
        The MIN function helps to find the lowest number or value in a range. It is typed "=MIN". It will only work for cells with numbers. This function ignores cells with text. For example, we will find the minimum charges for this patient worksheet.
I hope you gained more insights into Excel functions with examples. Stay tuned for more advanced Excel functions and concepts in my upcoming blog posts!