Open In App

How to Create Relational Tables in Excel?

Last Updated: 30 Jan, 2023

D

Summarize
Comments
Improve
Suggest changes
Like Article
Like
Share
Report
News Follow

Excel directly doesn’t provide us ready to use a database, but we can create one using relationships between various tables. This type of relationship helps us identify the interconnections between the table and helps us whenever a large number of datasets are connected in multiple worksheets. We can look for or easily find out certain information very quickly. 

Create Relational Tables in Excel

We will create two tables: one is the Master table and the other one is the detail table. The master table will have information like customer_id, product, sales channel, and cost. It will act as a primary table and rarely it will undergo a change. The detail table will have information like customer_id, name, and country. Data in the child table (detail table) changes frequently. We will create a relationship between two tables using the common column – customer_id in both fields.

Table 1: Order table: We create an order table with fields customer_id, Product, sales channel, and Cost. 

Order-Table.

 

Table 2: Customer table: We create a customer table with fields customer_id, Name, and country. 

Customer-Table.

 

Create both tables in excel either in the same sheet or as a separate file.

Method 1: By Creating a Pivot Table

Step 1: Go to the insert tab at the top of the ribbon and then Select PivotTable.

Selecting-PivotTable.

 

Step 2: “Create pivot table” dialog box appears. Here select the orders table in the first selection. (Here we have selected the range in our datasheet). Make sure to check the “add this data to the data model” field and then click OK.

Creating-PivotTable

 

Step 3: Do the same process for the customer table. Visualize the pivot table fields and go to “All view”. Both tables will be displayed. Here we have selected from the ranges so range name (range 2, range 3 in our case) will be displayed.

all-view

 

Step 4: To build a pivot table, select the name from the Customers table. Place it in the Rows area. We can either check the mark by expanding the table or dragging the field to the rows area. Select cost from the Orders table. Place it in the Values area.

pivot-table-fields

 

Step 5: Pivot the table fields pane showing the notice that “Relationship between the tables is needed”. There are two options available:

  • We can create the relationship between tables.
  • Let the excel guess by clicking on “Auto Detect”.
clicking-auto-detect

 

Step 6: In Auto Detect, excel will create a relationship. Click on “manage relationship” to check. By clicking on “Auto Detect,” simple associations with smaller tables and consistent field names may be built automatically. Once done, click on the close button.

selecting-manage-relationships

 

Step 7: The pivot table so created will have the customer name from the customer’s table and the total cost from the orders table.

pivot-table

 

If we want to create a relationship by ourselves, without letting excel do the auto-creation, click on the create button in the pivot table fields.

Step 8: It will open the edit relationship menu. Select the table containing orders as the main Table. (“range” in our case). Select Customer_id for the Column (Foreign). Select the table containing Customers as the Related Table. (“range1” in our case). Select Customer_id as the Related Column (Primary). Click ok to finish the relationship creation.

edit-relationship

 

The pivot table so created will have the customer name from the customer’s table and the total cost from the orders table.

pivot-table

 

Method 2: By Creating a Relationship between Two Tables

Before creating a pivot table, we can create a relationship between two tables as shown:

Step 1: Go to the Data tab on the top of the ribbon and then to the data tools group. Click on the relationships button.

selecting-data-tab

 

Step 2: This will open the relationships manage dialog box. All the existing relationships will be displayed with “active” status. We can perform all the options viz. edit, activate, deactivate, delete, auto-detect, etc.  

manage-relationships

 

Step 3: Once done, click on close. This will create a table having a similar customer_id from both tables. It will display the customer’s name from the customer’s table and the total cost from the orders table.

table-created

 

Advantages of Relational Tables

  • Aids in working with a large amount of data.
  • Recognize relations among multiple tables.
  • Helps in quickly searching data.
  • Retrieve specific information easily and quickly.
  • View the same data set in multiple ways.
  • Reduce data errors and redundancy.


D

News
Improve
Discuss
Do you want to advertise with us?Click here to know more

A

What-If Analysis with Data Tables in Excel

article_img
What-if analysis is the option available in Data. In what-if analysis, by changing the input value in some cells you can see the effect on output. It tells about the relationship between input values and output values. In this article, we will learn how to use the what-if analysis with data tables effectively. What is What-if Analysis? What-if analysis is a procedure in excel in which we work in tabular form data. In the What-if analysis variety of values have been in the cell of the excel sheet to see the result in different ways by not creating different sheets. There are three tools of what-if analysis. Tools of what-if analysis There are three tools in what-if analysis: Goal seek Scenario managerData TableGoal seek In goal seek we already know our output value we have to find the correct input value. For example, if a student wants to know his English marks and he knows all the rest of the marks and total marks in all subjects. Step 1: Write all subjects and their marks in an excel sheet and do the sum by applying the formula sum. Step 2: Go into the data tab of the Toolbar. Step 3: Under the Data Table section, Select the What-if analysis. Step 4: A drop-down appears.
Read More

R

Prepare Source Data for Pivot Tables In MS Excel

article_img
A pivot table is a tool for summarizing data that is derived from larger tables. A database, an Excel spreadsheet, or any other data that is or could be transformed into a table-like shape might be these larger tables. A pivot table's data summary may include sums, averages, or other statistics that the pivot table meaningfully groups together. Given that a pivot is defined in the dictionary as "a central point, pin, or shaft on which a mechanism spins or oscillates," the term "pivot table" actually provides a good indication of the significance of pivot tables and the function they play in analysis. When it comes to conducting data analysis, this idea is crucial. You can often find all the data you've been given on a subject in a database or dataset. To derive knowledge from this raw data is the entire purpose of any analysis. A table containing thousands of rows, however, cannot be fully understood by simply looking at it and scrolling up and down. Drawing insight frequently requires you to exclude certain data points and manipulate how they show their information, for instance through summary statistics. Data analysts use summary statistics to express a lot of information as sim
Read More

Pivot Tables in Excel - Step by Step Guide

article_img
Pivot Tables are one of the most powerful features in Excel, allowing you to analyze, summarize, and visualize large sets of data with ease. Whether you're tracking sales figures, analyzing trends, or creating reports, if you know how to do Pivot Tables then you can turn raw data into meaningful insights in just a few clicks.In this step-by-step guide, you will learn to create a Pivot Table in Excel from scratch, how to insert a Pivot Table, drag and drop fields for analysis, apply filters, and even customize the table to match your specific needs. This guide will help you to transform raw data into clear, actionable insights that save time and improve decision-making.How to Create a Pivot Table in ExcelHow to Create a Pivot Table in ExcelLooking for easy ways and methods to create pivot table in excel? Follow the below steps on how to build a pivot table in excel:Step 1: Open Excel Worksheet and Prepare Your DataBefore creating a pivot table, ensure your data is properly formatted:Organize in a Tabular Format:Place your data in rows and columns, with each column having a header.Avoid Blank Rows or Columns:Ensure there are no empty rows or columns within your dataset.Name Your Data
Read More

How to Create and Use Pivot Tables in Google Sheets

article_img
Pivot tables in Google Sheets are indispensable for turning raw data into meaningful insights. Whether you’re tracking sales, analyzing marketing metrics, or managing financial data, pivot tables allow users to create dynamic data summaries with ease. This tutorial covers how to use pivot tables in Google Sheets, including creating them with multiple sheets and troubleshooting common issues. Professionals across industries like finance, marketing, and project management can significantly benefit from mastering this versatile tool. What is a Pivot Table in Google SheetsA Pivot Table in Google Sheets is a powerful tool for summarizing and analyzing large datasets. It dynamically reshapes data, allowing you to group, filter, and perform calculations like SUM, COUNT, or AVERAGE to extract meaningful insights. For Example, a sales team can use a Pivot Table to summarize monthly sales by product and region, filtering for specific timeframes to identify trends. Pivot Tables offer dynamic data summarization and efficient analysis, making them an essential tool for decision-making.How to Create a Pivot Table in Google SheetsFollow this Google Sheets pivot table tutorial to quickly make a Pi
Read More

Editing Excel Macros in Excel

article_img
Excel Macro is a set of actions that can be recorded, saved, used multiple times. This feature saves us a lot of time when dealing with repetitive tasks and huge data sets. We can always make changes to an existing Macro in Excel. There are two ways to record and run macros: Excel Commands Excel Visual Basic for Applications(VBA).1. Copying a Macro Code We can reuse the existing macro code while creating new Macros. For example, if you have existing macros created using the record function, we can reuse the code to write new macros. To open the code follow the below steps: Select Tools --> Macros --> Visual Basic Editor. Copy code from the existing macros(use Command + C) and paste(use Command + V) in the new macro2. Renaming a Macro Follow the below steps to rename a Macro in Excel: Select Tools --> Macros --> Visual Basic Editor. Select name on the left plane.Edit the name.3. Deleting a Macro Follow the below steps to delete a macro in Excel: Select Tools --> Macros --> Macros... Select the macro to be deleted. Click on the minus(-) symbol at the bottom.Select yes to delete the macro.
Read More

Best Microsoft Excel High-Paying Jobs with Excel Skills in 2024

article_img
Are you ready to unlock a world of opportunities with Microsoft Excel? In today’s data-driven job market, mastering Excel is essential for launching a successful career, whether you're a fresher or an experienced professional. In this article, we will cover the high-paying Excel jobs available in 2024, including crucial roles like data analyst, business analyst, and many more. We'll explore the qualifications needed for these positions, along with salary estimations to help you understand your earning potential. Whether you’re looking for Excel jobs for freshers or seasoned professionals, we’ll also dive into options for Excel freelancing jobs and work-from-home jobs in Excel. Equip yourself with the knowledge to excel in your career and take the first step toward a lucrative future!Best Microsoft Excel High-Paying Jobs with Excel Skills in 2024Table of ContentWhy choose a career in ExcelWhy Excel Skills Are Essential for Your CareerEssential Excel Skills Required to Boost Your Resume Best Microsoft Excel High-Paying JobsFinancial AnalystsData AnalystAdministrative Assistant Accountants Project ManagersManagement ConsultantRetail Store ManagersBusiness Analyst Market Research A
Read More

Excel VLOOKUP Function - Excel Guide for Beginners

article_img
How to do Vlookup in Excel - Quick StepsPrepare Your DataEnter the VLOOKUP Formula >>Press EnterUse a Cell Reference for Flexibility Copy the Formula for Multiple RowsThe VLOOKUP function is one of the most widely used tools in Excel for looking up and retrieving data from a table. Whether you’re working with a single sheet or multiple workbooks, VLOOKUP allows you to search for a value in one column and return a related value from another. If you're new to Excel or still getting the hang of formulas, this guide is for you. We will cover everything from the basics of how VLOOKUP works to practical examples that show how to search data across sheets, troubleshoot common issues, and master the VLOOKUP formula for any task.Excel VLOOKUP FunctionWhat is the VLOOKUP Function in ExcelThe term VLOOKUP stands for Vertical Lookup. It is designed to search for a specific value in the first column of a table (lookup column) and retrieve corresponding data from a different column in the same row.Syntax of VLOOKUP FormulaVLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])Arguments:1. lookup_value: The value you want to search for (e.g., a specific ID, name, or product code).
Read More

AI in Excel: Top 20 Excel AI Tools in 2025 (Free/Paid)

article_img
The integration of AI in Excel is transforming the way professionals manage, analyze, and visualize data. Whether you're handling large datasets, performing financial analysis, or automating repetitive tasks, AI-powered tools can significantly improve efficiency and accuracy. In 2025, advanced Excel AI tools are making complex tasks easier by offering features like data cleaning, predictive analytics, smart automation, and AI-driven insights.In this guide, we’ve gathered a list of the top 20 Excel AI tools for 2025 that are reshaping how users interact with Excel.Table of ContentBest AI Tool in Excel: Top Picks for 2025Top 10 Free Excel AI Tools in 2025Top 10 Excel AI ToolsAI in Excel: OverviewIn Excel, an AI tool (Artificial Intelligence tool) refers to an add-in or extension that leverages artificial intelligence to enhance your spreadsheet experience. These tools can automate tasks, improve data analysis, and generally make you more productive.Excel has always been a powerful tool for data analysis, but with the integration of AI tools, it has transformed into a smarter, more intuitive platform.Best AI Tool in Excel: Top Picks for 2025Explore the below AI tools designed for auto
Read More

Working with Tables in MS Word

article_img
Microsoft Word or MS-WORD is a graphical word processing program that users can type with. It allows the users to type and save documents very similar to other word processors. There are many versions of MS-word in market, which the user can install as per te. In this tutorial, we will learn about the tables in MS-Word. Tables in MS Word are made up of rows and columns with an organized arrangement of text. These tables can be used to align numbers in columns and then various operations can be performed on them. Tables can also be used to create page layouts. Rows in a table are series of data banks laid out horizontally in a table or spreadsheet. Columns are vertical series of cells in a chart, table, or spreadsheet. How to Create a Table? Tables in MS Word can be created in the following two ways: 1. Using the Grid 2. Using Table Dialogue Box Using the Grid Following are the steps of creating a table using the Grid provided in MS Word: Step 1: Go to the Insert tab and click on the Table button. Step 2: In the dropdown menu, select the number of rows and columns from the Grid. Using Table Dialogue Box Following are the steps of creating a table using Table Dialogue Box in MS Word
Read More

How to Insert and Edit Tables in Google Docs: A Complete Guide

article_img
Creating and managing tables in Google Docs helps you organize information effectively, making your documents more professional and easier to read. Whether you're drafting a report, preparing a project document, or scheduling, knowing how to insert and edit tables is a valuable skill. In this article, you will learn the process of adding and formatting tables in Google Docs, including tips for mobile devices.To get started, we'll show you how to insert a table in Google Docs and provide some useful tips on table formatting. You'll learn how to create tables, adjust their styles, and use features like merging cells and aligning content. Additionally, we'll cover how to work with Google Docs table templates, format your table of contents, add a Table in Google Docs on iPad and Mobile and make your tables visually appealing with borders and spacing adjustments.How To Insert Table In Google DocsTable of ContentHow to Insert Table in Google DocsHow to Edit a Table in Google Docs How to Insert a Table in Google Docs on MobileHow to Insert Table in Google DocsTo insert a Table in Google Docs with row and column according to your need, follow the steps below:Step 1: Open Google DocsOpen yo
Read More
three90RightbarBannerImg