BSYS-2000 Final Exam Notes
Grouping Worksheets & 3-D References
• Grouping Worksheets:
o Hold Ctrl and click multiple sheet tabs.
o Actions performed on one sheet apply to all grouped sheets.
• 3-D Reference Formula Example:
=SUM(Sheet1:Sheet3!B2)
1. Group Multiple Worksheets
Goal: Apply the same formatting, formula, or data entry to multiple sheets at once.
Steps:
1. Open your Excel file with multiple sheets (e.g., Sheet1, Sheet2, Sheet3).
2. Hold Ctrl on your keyboard.
3. Click each sheet tab (at the bottom) you want to group.
o You’ll see the tabs appear white, and “Group” will appear in the title bar.
4. Now, type or format something on one sheet — it will apply to all grouped sheets.
To ungroup: Right-click any tab → click Ungroup Sheets.
2. Create a 3-D Reference Formula
Goal: Use one formula to refer to the same cell across multiple sheets.
Example Setup:
• Let’s say:
o Sheet1 has a value in cell B2 = 10
o Sheet2 B2 = 20
o Sheet3 B2 = 30
Steps to create 3-D formula:
1. Go to a new sheet (e.g., “Summary” sheet).
2. Click in a cell (e.g., B2) where you want the result.
3. Enter the formula: =SUM(Sheet1:Sheet3!B2)
4. Press Enter.
This adds up B2 from Sheet1, Sheet2, and Sheet3, returning 60.
Notes:
• 3-D references work with functions like SUM, AVERAGE, MAX, MIN, etc.
• Sheets must be next to each other in the workbook for Sheet1:Sheet3 to work
correctly.
• You can still group sheets and use 3-D references together for efficient updates and
calculations.
Pivot Tables
• Steps:
1. Select your data.
2. Go to Insert → PivotTable.
3. Drag fields into Rows, Columns, Values, and Filters.
• Tips:
o Use Value Field Settings to summarize data (Sum, Average, Count, etc.).
o Filter using slicers.
1. Select Your Data
• Make sure your data is organized in a table format:
o Column headers in the first row (e.g., Region, Sales, Rep)
o No blank rows or columns
Tip: Use Ctrl + A to quickly select all data.
2. Insert a Pivot Table
1. Go to the Insert tab on the ribbon.
2. Click PivotTable.
3. In the dialog box:
o Choose the data range (auto-filled if selected already).
o Select where to place the PivotTable:
▪ New Worksheet (recommended)
▪ Existing Worksheet
4. Click OK.
3. Drag Fields into Pivot Table Areas
You’ll see the PivotTable Field List on the right.
Drag fields to:
• Rows → Categories to analyze (e.g., Region)
• Columns → Subcategories across the top (e.g., Product)
• Values → Numeric fields to summarize (e.g., Sales)
• Filters → Filter entire Pivot Table (e.g., by Year)
Example:
Drag Region → Rows
Drag Sales → Values
Drag Product → Columns
4. Use Value Field Settings
• Click the drop-down arrow in the Values field.
• Choose Value Field Settings.
• Select a summary function:
o Sum (default)
o Average
o Count
o Max / Min
You can also rename the custom field here (e.g., “Total Sales”).
5. Add Slicers (Optional Filters)
1. Click anywhere inside the Pivot Table.
2. Go to PivotTable Analyze → Insert Slicer.
3. Choose the field(s) you want to filter by (e.g., Region, Rep).
4. Click OK — slicer(s) will appear and allow clickable filtering.
Drag the slicer box and resize for better layout.
Data Validation, Input Message & Error Alerts
• Steps:
1. Select cell(s).
2. Go to Data → Data Validation.
• Types:
o Whole Number, Decimal, List, Date, etc.
• Input Message Tab:
o Message shown when cell is selected.
• Error Alert Tab:
o Show alert on invalid input (Stop, Warning, Information).
1. Apply Data Validation to a Cell
Steps:
1. Select the cell(s) you want to control (e.g., B2:B10).
2. Go to the Data tab → Click Data Validation (in the "Data Tools" group).
3. In the Settings tab, choose the validation type under Allow:
Common options:
o Whole Number (e.g., 1 to 100)
o Decimal
o List (e.g., Yes,No)
o Date or Time
o Custom formula
4. Set the allowed criteria.
o Example: Whole Number → between 1 and 10
5. Click OK to apply.
2. Add an Input Message (optional)
Purpose: Show instructions when the cell is selected.
Steps:
1. In the Data Validation window, go to the Input Message tab.
2. Check "Show input message when cell is selected".
3. Enter:
o Title: e.g., "Enter Score"
o Message: e.g., "Please enter a number between 1 and 10"
4. Click OK.
Result: When the user clicks the cell, the message pops up as a tooltip.
3. Add an Error Alert (optional but recommended)
Steps:
1. In the Data Validation window, go to the Error Alert tab.
2. Check "Show error alert after invalid data is entered".
3. Choose the Style:
o Stop 🚫 = Blocks invalid entry (strict)
o Warning ⚠️ = Warns, but allows override
o Information ℹ️ = Shows a message but accepts input
4. Enter:
o Title: e.g., "Invalid Entry"
o Message: e.g., "Only numbers between 1 and 10 allowed"
5. Click OK.
Example:
• Allow: Whole Number → between 1 and 10
• Input Message: "Enter a score from 1 to 10 only."
• Error Alert: "Invalid Entry – Please enter a valid score."
Add to Data Model & Create Relationships
• Add Tables to Data Model:
o Check “Add this data to the Data Model” when creating PivotTables.
• Create Relationships:
o Data → Relationships.
o Define Primary and Foreign keys.
1. Add Tables to the Data Model
Goal: Combine multiple tables for use in a single Pivot Table (without VLOOKUP).
Steps:
1. Make sure each table is formatted as a Table:
o Select data → Press Ctrl + T → Click OK.
o Name each table (e.g., Orders, Customers) using Table Design tab.
2. Go to Insert → PivotTable.
3. In the PivotTable dialog:
o Check “Add this data to the Data Model”.
o Choose where to place the PivotTable (new/existing sheet).
4. Click OK.
Repeat this for each table you want to include in the data model.
2. Create Relationships Between Tables
Steps:
1. Go to the Data tab.
2. Click Relationships (in the Data Tools group).
3. Click New to define a relationship.
4. In the "Create Relationship" dialog:
o Table: Choose the main table (e.g., Orders)
o Column: Choose the foreign key (e.g., CustomerID in Orders)
o Related Table: Choose the lookup table (e.g., Customers)
o Related Column: Choose the primary key (e.g., CustomerID in Customers)
5. Click OK.
This sets up a one-to-many relationship (like a database join).
3. Use in Pivot Table
• Now you can use fields from multiple related tables in one Pivot Table.
• Drag fields from both tables into Rows, Values, Columns, etc.
Example:
• Tables: Orders, Customers
• Relationship: Orders[CustomerID] → Customers[CustomerID]
Now, you can analyze Order Amounts by Customer Name even though they’re in separate
tables.
Get & Transform Data (Power Query)
• Steps:
1. Go to Data → Get & Transform Data.
2. Import data from Excel, CSV, web, etc.
3. Use Power Query Editor to clean and transform:
▪ Remove columns
▪ Split columns
▪ Filter rows
▪ Change data types
1. Open Power Query (Get & Transform Data)
• Go to the Data tab on the ribbon.
• In the Get & Transform Data section, choose your data source:
o From Workbook (another Excel file)
o From Text/CSV
o From Web
o From Table/Range (if already in Excel)
Example: To import a CSV file, click From Text/CSV → select your file → click Import.
2. Load Data into Power Query Editor
• Excel shows a preview of your data.
• Click Transform Data (not Load) to open Power Query Editor.
• You’re now in the Power Query Editor workspace.
3. Clean & Transform the Data
Remove Columns
• Right-click the column header → Select Remove.
• Or use: Home tab → Remove Columns.
Split Columns
• Select the column → Go to Home or Transform tab.
• Choose Split Column (e.g., by delimiter like comma or space).
Filter Rows
• Click the drop-down arrow in a column header.
• Use checkboxes, text filters, or number/date filters to keep only desired rows.
Change Data Types
• Select a column → Go to Transform tab.
• Use Data Type dropdown (e.g., Whole Number, Date, Text).
4. Apply & Load the Data
• Once finished, click Close & Load from the Home tab.
• Choose:
o Close & Load → load into a new worksheet.
o Close & Load To… → load to Pivot Table, Data Model, or Connection only.
Pivot Table with Power Pivot
• Enable Power Pivot:
o File → Options → Add-ins → Manage COM Add-ins → Check "Microsoft
Power Pivot".
• Steps:
1. Add tables to the Data Model.
2. Create relationships.
• In the Power Pivot window, go to: Diagram View.
• Drag and drop related fields to link tables
(e.g., CustomerID in Orders to CustomerID in Customers).
• This sets up Primary-Foreign Key relationships.
3. Insert PivotTable using “Use this workbook’s Data Model”.
4. Use measures and KPIs with DAX formulas.
• In Power Pivot window → Click New Measure:
TotalSales: = SUM(Sales[Amount])
To create KPIs:
• Right-click on a measure → Click Create KPI.
• Define target and thresholds (e.g., sales target = 100,000).
Database Functions
• Syntax: =DFunction(Database, Field, Criteria)
• DFUNCTION: Replace this with DSUM, DCOUNT, DMAX, DMIN, or DAVERAGE.
• database: The range of your data, including headers (e.g., A1:D20).
• field: The column to operate on — use a column name in quotes (e.g., "Sales") or
a column number (e.g., 2).
• criteria: A separate range with the same headers and the condition below (e.g., F1:F2).
Example: DSUM
• You want to sum the "Sales" column where "Region" is "West":
• Data Range (A1:C6):
Region Sales Rep
West 100 Ann
East 200 Bob
West 150 Cara
East 300 Dave
West 250 Emma
• Criteria Range (E1:E2):
Region
West
• Formula: =DSUM(A1:C6, "Sales", E1:E2)
• This will return 500 (sum of 100, 150, 250).
Advanced Filter (Criteria & Output Range)
• Steps:
1. Set up a criteria range (same headers, criteria below).
2. Go to Data → Advanced (in the Sort & Filter group).
3. Choose:
▪ Filter in-place
▪ Copy to another location
4. Define:
▪ List Range (your data)
▪ Criteria Range
▪ Copy to (if output range)
1. Set Up a Criteria Range
Steps:
1. Above or beside your data table, create a criteria range:
o Use the same column header(s) as your data.
o Type your condition(s) directly below the headers.
Example:
To filter rows where Region = West, write:
Region
West
Multiple criteria in the same row = AND
Multiple criteria in separate rows = OR
2. Open Advanced Filter
1. Click anywhere inside your data.
2. Go to the Data tab.
3. In the Sort & Filter group, click Advanced.
3. Choose Filter Type
In the Advanced Filter dialog:
• Choose one:
o Filter the list, in-place (filters within the original data)
o Copy to another location (outputs filtered data elsewhere)
4. Define Ranges
Fill in the required fields:
• List range: Select the full data table (including headers).
• Criteria range: Select your criteria area (headers + condition).
• Copy to (only if copying results): Select the cell where you want the filtered data to
appear.
All ranges must include headers.
5. Click OK
• Excel will filter based on your criteria and show the results either:
o In the original table (in-place), or
o In a new range (copied).
Example:
Data Table:
Region Sales
West 500
East 300
Criteria Range:
Region
West
Use Advanced Filter to extract just rows with Region = West.