Adding/subtracting numbers in same cell

rpoppy

New Member
Joined
Jul 28, 2010
Messages
9
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
 

Some videos you may like

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,953
Office Version
365, 2010
Platform
Windows
Are the surrounding words always the same? What is the wording for an increase?
 

rpoppy

New Member
Joined
Jul 28, 2010
Messages
9
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
Joined
Mar 17, 2004
Messages
19,953
Office Version
365, 2010
Platform
Windows
=ABS(REPLACE(LEFT(A1,FIND("by",A1)-1),1,30,"")-TRIM(RIGHT(SUBSTITUTE(A1,"$",REPT(" ",255),2),255)))
 

rpoppy

New Member
Joined
Jul 28, 2010
Messages
9
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
Joined
Mar 17, 2004
Messages
19,953
Office Version
365, 2010
Platform
Windows
=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)))
 

Subscribe on YouTube

Watch MrExcel Video

Forum statistics

Threads
1,106,389
Messages
5,511,044
Members
408,823
Latest member
TJKnight

This Week's Hot Topics

  • Turn fraction around
    Hello I need to turn a fraction around, for example I have 1/3 but I need to present as 3/1
  • TIme Clock record reformatting to ???
    Hello All, I'd like some help formatting this (Tbl-A)(Loaded via Power Query) [ATTACH type="full" width="511px" alt="PQdata.png"]22252[/ATTACH]...
  • TextBox Match
    hi, I am having a few issues with my code below, what I need it to do is when they enter a value in textbox8 (QTY) either 1,2 or 3 the 3 textboxes...
  • Using Large function based on Multiple Criteria
    Hello, I can't seem to get a Large formula to work based on two criteria's. I can easily get a oldest value based one value, but I'm struggling...
  • Can you check my code please
    Hi, Im going round in circles with a Compil Error End With Without With Here is the code [CODE=rich] Private Sub...
  • Combining 2 pivot tables into 1 chart
    Hello everyone, My question sounds simple but I do not know the answer. I have 2 pivot tables and 2 charts that go with this. However I want to...
Top