+ Reply to Thread
Results 1 to 7 of 7

Function to Subtract values with symbol within

Hybrid View

jneeb Function to Subtract values... 04-11-2008, 08:50 AM
NBVC If the + is consistently at... 04-11-2008, 08:54 AM
jneeb I understand what you are... 04-11-2008, 10:18 AM
NBVC Just select one of the 2... 04-11-2008, 10:25 AM
jneeb It works. On the replacing... 04-11-2008, 12:15 PM
NBVC If you use the second... 04-11-2008, 12:17 PM
jneeb Its perfect You just made my... 04-11-2008, 01:23 PM
  1. #1
    Registered User
    Join Date
    04-11-2008
    Posts
    6

    Function to Subtract values with symbol within

    I work in the gas pipeline industry, and we use a different way of caluculating progress. For example 861+64 actualy means 86,164 feet. How can I make excel recognize this + value as nothing. I need to take 861+64 and minus another number such as 750+00.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If the + is consistently at the 4th position, then try

    =TEXT(REPLACE(A1,4,1,"")-REPLACE(B1,4,1,""),"000+00")

    where A1 and B1 contain values to subtract from each other.

    This will return result in same format as original.

    If + is not consistently positioned, then try:

    =TEXT(SUBSTITUTE(A1,"+","")-SUBSTITUTE(B1,"+",""),"000+00")
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    04-11-2008
    Posts
    6
    Quote Originally Posted by NBVC
    If the + is consistently at the 4th position, then try

    =TEXT(REPLACE(A1,4,1,"")-REPLACE(B1,4,1,""),"000+00")

    where A1 and B1 contain values to subtract from each other.

    This will return result in same format as original.

    If + is not consistently positioned, then try:

    =TEXT(SUBSTITUTE(A1,"+","")-SUBSTITUTE(B1,"+",""),"000+00")
    I understand what you are saying but I do not know exactly how to do that. I am relatively new to excel, but I have a desire to learn.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Just select one of the 2 formulas....the 2nd is probably better as it is more flexible....and copy it to your spreadsheet in the cell you want to see a result in.

    You just need to change the A1 and B1 in the formula to reference the actual cells your first and second numbers are in...

  5. #5
    Registered User
    Join Date
    04-11-2008
    Posts
    6
    Quote Originally Posted by NBVC
    If the + is consistently at the 4th position, then try

    =TEXT(REPLACE(A1,4,1,"")-REPLACE(B1,4,1,""),"000+00")

    where A1 and B1 contain values to subtract from each other.

    This will return result in same format as original.

    If + is not consistently positioned, then try:

    =TEXT(SUBSTITUTE(A1,"+","")-SUBSTITUTE(B1,"+",""),"000+00")
    It works.
    On the replacing the + sign when I get down to a lower value such as
    86+00 I rplace the 4th position to the 3rd position and it works fine.
    thanks for your help

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    If you use the second function, i.e. =TEXT(SUBSTITUTE(A1,"+","")-SUBSTITUTE(B1,"+",""),"000+00")

    then you don't need to do those adjustments....it is more flexible as to where the + sign occurs.

  7. #7
    Registered User
    Join Date
    04-11-2008
    Posts
    6
    Quote Originally Posted by NBVC
    If you use the second function, i.e. =TEXT(SUBSTITUTE(A1,"+","")-SUBSTITUTE(B1,"+",""),"000+00")

    then you don't need to do those adjustments....it is more flexible as to where the + sign occurs.
    Its perfect You just made my job a lot easier. We work a 12 hour day 6 days a week and there is just not enough time to do my data entry at the end of the day this will help tremendously. Thanks alot.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1