# How to Calculate Delta Between Two Numbers in Excel

Indeed, Microsoft Excel is a highly effective program. We can execute continuous operations on a given dataset using Excel’s tools and capabilities. In this article, we will demonstrate 5 easy and quick methods on how to calculate the delta between two numbers in Excel. Delta indicates the difference between the 2 numbers. We can easily calculate the delta in Excel. Also, there is a DELTA function available in Excel. So, without further ado, let’s go through the entire article to understand the topic properly.

You may download the following Excel workbook for better understanding and practice yourself.

## 5 Methods to Calculate Delta Between Two Numbers in Excel

For ease of understanding, we are going to use a List of Marks. This dataset includes the name of the Students, and their corresponding marks for Test 1 and Test 2 in columns B, C, and D respectively. Note: This is a basic dataset to keep things simple. In a practical scenario, you may encounter a much larger and more complex dataset.
Now, using this dataset, we’ll show 5 convenient approaches to calculate the delta between two numbers in Excel. So let’s explore them one by one.

### 1. Using DELTA Function

In our first method, we won’t calculate the difference between two numbers actually. Basically, we will test that is there any difference between the numbers or not. For this purpose, we’ll get the help of the DELTA function. So, let’s explore the method step by step.

📌 Steps:

• At the very beginning, create a new column with the heading Result.
• Then, in this column, select cell E5 and enter the formula below.
`=DELTA(C5,D5)`
• After that, press the ENTER key. • Now, bring the cursor to the right-bottom corner of cell E5 and it’ll look like a plus (+) sign. Actually, it’s the Fill Handle tool.
• Currently, double-click on it. Magically, it’ll copy the formula to the lower cells with correct cell references and give you outputs in the remaining blank cells. If you look at the above image carefully, you can see that if the marks of Test 1 and Test 2 aren’t the same, it gives 0 in Column E. This happens in the case of Jonas. Contradictorily, if the numbers in both tests become the same, then the output becomes 1 in Column E. Which happens in the case of Sara.

• Again, construct a new column with the heading Difference and go to the first cell (F5) of this column.
• At this moment, insert the following formula into the cell.
`=IF(E5=0,“YES”,“NO”)`
• Like before, press ENTER. Right now, we want to highlight the cells containing the text NO so that they get noticed easily in our eyes. To do this,

• At first, select cells in the F5:F14 range.
• Secondly, navigate to the Home tab.
• Thirdly, click on the Conditional Formatting drop-down icon on the Styles group of commands.
• Then, click on Highlight Cells Rules from the drop-down list.
• From the sub-menu, select Text that Contains. Immediately, the Text That Contains dialog box appears before us. Instantly, the Format Cells wizard will open up.

• Here, proceed to the Fill tab.
• Afterward, choose Red as the Background Color. • Also, advance to the Font tab.
• Hereafter, select Bold as the Font Style.
• Lastly, click OK. Finally, the result is before our eyes. ### 2. Utilizing ABS Function

From this method and the following ones, we’ll calculate the amount of delta between two numbers in Excel. In this approach, we’ll use the ABS function. Let’s see the process in detail.

📌 Steps:

• At first, go to cell E5 and write down the formula below.
`=ABS(C5-D5)`
• Henceforth, tap ENTER. Simply, we got the delta between these two numbers. Actually, it’s the difference between the two numbers. Generally, when we subtracted 40 from 37, we get -3. But, here the result is 3 because it’s just the difference between the numbers omitting the sign.

### 3. Inserting SQRT Function

When you have a tool like Microsoft Excel, you can effortlessly perform such a task using different methods. In the following procedure, we’ll make use of the SQRT function. So, without further delay, let’s dive in!

📌 Steps:

• Firstly, select cell E5 and put down the following formula into the cell.
`=SQRT((C5-D5)^2)`

Here, we squared the term (C5-D5) first. Again, we calculated the square root to get only the positive difference.

• Secondly, hit ENTER. ### 4. Employing IF Function

If you’re one of those people who enjoy using Excel formulas then this method have you covered. It’s simple & easy, just follow along.

📌 Steps:

`=IF(C5>D5,C5-D5,D5-C5)`

Here, we introduced a logical statement with the IF function. The logical_test argument of this formula is C5>D5. If this is true, the output in cell E5 will be C5-D5 which is the value_if_true argument. Otherwise, it will be D5-C5 which is the value_if_false argument.

• Then, hit ENTER. ### 5. Applying VBA to Create User-Defined Function

Although using formulas is a quick way of editing data, it can be difficult to interpret. Furthermore, if you often need to automate the task, then you may consider the VBA code below. So let’s begin.

📌 Steps:

• Primarily, proceed to the Developer tab.
• Then, click on Visual Basic in the Code group. Instantly, Microsoft Visual Basic for Applications window will pop up.

• Secondarily, go to the Insert tab.
• Then, click on Module from the options. Instantly, Excel will insert a new module on the right of the display.

• After that, paste the following code into the module.
``````Function Cal_Delta(x As Double, y As Double)
Cal_Delta = Abs(x - y)
End Function`````` Then, save the file as Excel Macro-Enabled Workbook.

• Following this, get back to the worksheet named VBA.
• Subsequently, go to cell E5 and write down =c and you will find some suggestions starting with c.
• Just, double-click on the first highlighted function which we created a while ago. Alternatively, you can press the TAB key to select the function. • Thenceforth, give the arguments of the function. The final form of the formula looks like the following.
`=Cal_Delta(C5,D5)`
• As usual, press ENTER. • Similarly, use the Fill Handle tool to get the other cell’s results. ## Practice Section

For doing practice by yourself we have provided a Practice section like the one below in each sheet on the right side. Please do it by yourself. ## Related Articles #### Shahriar Abrar Rafid

Hello! Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. My last educational degree was BSc in Engineering from the Bangladesh University of Engineering & Technology. I am a Naval Architecture and Marine Engineering graduate with a great interest in research and development. I love reading books & traveling. Always try to gather knowledge from various sources and implement them effectively in my work.

We will be happy to hear your thoughts  5 Excel Tips
You Never Knew  