# Adding/subtracting numbers in same cell

#### rpoppy

##### New Member
Hello! If I have multiple numbers in the same cell is it possible to add or subtract them? For example I have a cell that says "Funding costs decreased from \$500 by \$400" so the next cell over needs to show the current amount which would be "\$100."

Is there a way to do this without having to manually add or subtract the numbers and input the amount? Thank you in advance!

- rpoppy

### Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

#### Scott Huish

##### MrExcel MVP
Are the surrounding words always the same? What is the wording for an increase?

#### rpoppy

##### New Member
It is the same wording. It would read "Funding costs incresed from \$100 by \$400" and the next cell would say "\$500"

Thanks!

#### Scott Huish

##### MrExcel MVP
=ABS(REPLACE(LEFT(A1,FIND("by",A1)-1),1,30,"")-TRIM(RIGHT(SUBSTITUTE(A1,"\$",REPT(" ",255),2),255)))

#### rpoppy

##### New Member
Thanks! That helped a lot. The only problem is that it only decreases the two numbers and sometimes they need to be increased. Is there a way to make it so that it will do both depending on the wording inside the cell?

#### Scott Huish

##### MrExcel MVP
=IF(MID(A1,15,9)="decreased",REPLACE(LEFT(A1,FIND("by",A1)-1),1,30,"")-TRIM(RIGHT(SUBSTITUTE(A1,"\$",REPT(" ",255),2),255)),REPLACE(LEFT(A1,FIND("by",A1)-1),1,30,"")+TRIM(RIGHT(SUBSTITUTE(A1,"\$",REPT(" ",255),2),255)))

Replies
1
Views
62
Replies
2
Views
26
Replies
3
Views
33
Replies
1
Views
88
Replies
12
Views
171