LOOKUP Functions in Excel
LOOKUP:
Purpose: Searches for a value in a single row or column and returns a value from the same position in another row or column.
Syntax: LOOKUP(lookup_value, lookup_vector, [result_vector])
Example: If you want to find the price of an item based on its ID, you can use LOOKUP(ID, ID_column, Price_column)1.
VLOOKUP:
Purpose: Searches for a value in the first column of a table and returns a value in the same row from a specified column.
Syntax: VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
Example: To find a product name based on its ID, use VLOOKUP(ID, table, 2, FALSE)2.
HLOOKUP:
Purpose: Searches for a value in the top row of a table and returns a value in the same column from a specified row.
Syntax: HLOOKUP(lookup_value, table_array, row_index_num, [range_lookup])
Example: To find a sales figure based on a month, use HLOOKUP(month, table, 3, FALSE)2.
XLOOKUP:
Purpose: Searches a range or array and returns an item corresponding to the first match it finds. It can search in any direction (up, down, left, right).
Syntax: XLOOKUP(lookup_value, lookup_array, return_array, [if_not_found], [match_mode], [search_mode])
Example: To find an employee’s department based on their name, use XLOOKUP(name, name_column, department_column)
Date and Time Functions in Excel
DATE:
Purpose: Creates a date from individual year, month, and day components.
Syntax: DATE(year, month, day)
Example: =DATE(2024, 8, 20) returns August 20, 20241.
TODAY:
Purpose: Returns the current date.
Syntax: TODAY()
Example: =TODAY() might return today’s date, like August 20, 20242.
NOW:
Purpose: Returns the current date and time.
Syntax: NOW()
Example: =NOW() might return the current date and time, like August 20, 2024, 13:482.
DAY, MONTH, YEAR:
Purpose: Extracts the day, month, or year from a date.
Syntax: DAY(date), MONTH(date), YEAR(date)
Example: =DAY(A1) returns the day part of the date in cell A12.
HOUR, MINUTE, SECOND:
Purpose: Extracts the hour, minute, or second from a time.
Syntax: HOUR(time), MINUTE(time), SECOND(time)
Example: =HOUR(B1) returns the hour part of the time in cell B12.
DATEDIF:
Purpose: Calculates the difference between two dates in days, months, or years.
Syntax: DATEDIF(start_date, end_date, unit)
Example: =DATEDIF(A1, B1, "D") returns the number of days between the dates in cells A1 and B11.
NETWORKDAYS:
Purpose: Returns the number of whole workdays between two dates.
Syntax: NETWORKDAYS(start_date, end_date, [holidays])
Example: =NETWORKDAYS(A1, B1) returns the number of workdays between the dates in cells A1 and B12.
PivotTables in Excel
PivotTables are one of Excel’s most powerful features for data analysis. They allow you to quickly summarize, analyze, explore, and present large amounts of data in a flexible and easy-to-understand manner. Here’s a brief overview:
Creating a PivotTable:
Steps: Select your data range, go to the Insert tab, and click on PivotTable. Choose where you want the PivotTable to be placed (new worksheet or existing worksheet) and click OK12.
Fields and Areas:
Fields: These are the columns in your data set. You can drag fields to different areas in the PivotTable Field List.
Areas: There are four main areas where you can place fields:
Rows: Displays unique values from the selected field as row labels.
Columns: Displays unique values from the selected field as column labels.
Values: Displays summary data, such as sums or averages.
Filters: Allows you to filter the entire PivotTable based on the selected field2.
Summarizing Data:
Default Calculations: By default, PivotTables summarize data by summing or counting the items. You can change this to other calculations like average, max, min, etc., by right-clicking on the value field and selecting Value Field Settings2.
Sorting and Filtering:
Sorting: You can sort data in ascending or descending order by right-clicking on a cell and choosing the sort option.
Filtering: Use the filter drop-downs in the PivotTable to display only the data you need2.
Refreshing Data:
If your source data changes, you can refresh the PivotTable to update it. Right-click on the PivotTable and select Refresh1.