# Excel syntax question....

**URL:** <https://boards.straightdope.com/t/excel-syntax-question/499775>\
**Category:** Factual Questions\
**Created:** [June 14, 2009, 11:53pm UTC](https://boards.straightdope.com/t/excel-syntax-question/499775 "2009-06-14T23:53:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/stoid/32/272_2.png) [@Stoid](https://boards.straightdope.com/u/Stoid)\
**Post date:** [June 14, 2009, 11:53pm UTC](https://boards.straightdope.com/t/excel-syntax-question/499775/1 "2009-06-14T23:53:57Z")

</div>

Cell1 950,000  
Cell2 65%  
Cell3 425,000  
I want to:

Mutiply Cell1 by Cell2, subtract cell 3 from that result, and take THAT result and express it as a percentage of Cell1.

In other words:

65% of 950,000 is 617,000. Subtract 425,000, leaving 192,500. 192,500 is 20.2% of 950,000.

Displayed in the cell: **20.2%**  
This:

=(cell1\*cell2)-cell3

does return the correct value of 192,00. I just don’t know how to tell Excel to take that result and express it as a percentage of Cell1. I tried:

=(cell1\*cell2)-cell3/cell1

But that results in 617,499.55 - the 65%.

So how do I get that final part in the same formula?

---

<div class="post-metadata">

**Author:** ![BetsQ](https://avatars.discourse-cdn.com/v4/letter/b/fbc32d/32.png) [@BetsQ](https://boards.straightdope.com/u/BetsQ)\
**Post date:** [June 15, 2009, 12:16am UTC](https://boards.straightdope.com/t/excel-syntax-question/499775/2 "2009-06-15T00:16:43Z")

</div>

You just need some parentheses.

=(cell1\*cell2-cell3)/cell1

---

<div class="post-metadata">

**Author:** ![rowrrbazzle](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/rowrrbazzle/32/414_2.png) [@rowrrbazzle](https://boards.straightdope.com/u/rowrrbazzle)\
**Post date:** [June 15, 2009, 12:16am UTC](https://boards.straightdope.com/t/excel-syntax-question/499775/3 "2009-06-15T00:16:54Z")

</div>

Use additional parentheses before dividing by cell1.

**(**(cell1\*cell2)-cell3\*\*)\*\*/cell1

---

<div class="post-metadata">

**Author:** ![BubbaDog](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bubbadog/32/333_2.png) [@BubbaDog](https://boards.straightdope.com/u/BubbaDog)\
**Post date:** [June 15, 2009, 12:19am UTC](https://boards.straightdope.com/t/excel-syntax-question/499775/4 "2009-06-15T00:19:28Z")

</div>

Why not ((Cell1\*Cell2)-Cell3)/Cell1 ?

Edit - I’m late to the party

---

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [June 15, 2009, 12:20am UTC](https://boards.straightdope.com/t/excel-syntax-question/499775/5 "2009-06-15T00:20:38Z")

</div>

> [@Stoid](#):
>
> Cell1 950,000  
> Cell2 65%  
> Cell3 425,000  
> I want to:
> 
> Mutiply Cell1 by Cell2, subtract cell 3 from that result, and take THAT result and express it as a percentage of Cell1.
> 
> In other words:
> 
> 65% of 950,000 is 617,000. Subtract 425,000, leaving 192,500. 192,500 is 20.2% of 950,000.
> 
> Displayed in the cell: **20.2%**  
> You need to use
> 
> This:
> 
> =(cell1\*cell2)-cell3
> 
> does return the correct value of 192,00. I just don’t know how to tell Excel to take that result and express it as a percentage of Cell1. I tried:
> 
> =(cell1\*cell2)-cell3/cell1
> 
> But that results in 617,499.55 - the 65%.
> 
> So how do I get that final part in the same formula?

=((cell1\*cell2)-cell3)/cell1

otherwise excel follows the operation order of math which does division before addition or subtraction. That is, the way you wrote it Excel performs =(cell1\*cell2)-(cell3/cell1)

BTW you don’t need parentheses around cell1\*cell2 because that operation is performed first as you wish it to be. See  
[http://www.mathgoodies.com/lessons/vol7/order\_operations.html](http://www.mathgoodies.com/lessons/vol7/order_operations.html)

for a simple explanation

---

<div class="post-metadata">

**Author:** ![Purd\_Werfect](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@Purd\_Werfect](https://boards.straightdope.com/u/Purd_Werfect)\
**Post date:** [June 15, 2009, 12:27am UTC](https://boards.straightdope.com/t/excel-syntax-question/499775/6 "2009-06-15T00:27:35Z")

</div>

I’m sure there’s a more elegant way, because there always is in Excel, but why not break the equations up?

=Cell1\*Cell2 with the output into a third cell. (Cell3)  
=Cell3-Cell4 (Cell4 is the 425,000 in your example.) with the output to a 5th cell.(Cell5)  
=Cell5/Cell1

---

<div class="post-metadata">

**Author:** ![Purd\_Werfect](https://avatars.discourse-cdn.com/v4/letter/p/e47c2d/32.png) [@Purd\_Werfect](https://boards.straightdope.com/u/Purd_Werfect)\
**Post date:** [June 15, 2009, 12:28am UTC](https://boards.straightdope.com/t/excel-syntax-question/499775/7 "2009-06-15T00:28:41Z")

</div>

Geeze, ignore my answer. 🙂
