+ Reply to Thread
Results 1 to 10 of 10

Remove minus infront and behind of numbers in rang of cells

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Remove minus infront and behind of numbers in rang of cells

    HI I need a macro, which can remove minus infront and also behind numbers. All in a range in column K.There will be numbers, which is positive and it shall not touch them. Only the ones with minus.

    Please have a look. Have tried to find this, but they change from plus to minus. And i dont need that.

    Hope some can help. And i this case it need to be a macro

    Thanks in advance
    Sincerely

    Abjac

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Remove minus infront and behind of numbers in rang of cells

    CTRL + H

    find -
    replace by (leave blanc)
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Remove minus infront and behind of numbers in rang of cells

    HI Oeldera did not work. I have uploaded the test sheet with the numbers. Part of a bigger project. But i can see that they are created by a formula.
    But it is runned by a macro. So please have a look at the test sheet. I tried the replace function also in the numbers without formula, also here did not work.
    Please have a look thanks.

    Abjac
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Remove minus infront and behind of numbers in rang of cells

    =ABS(if(J2<>I2,J2-I2.""))

    and drag down.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: Remove minus infront and behind of numbers in rang of cells

    http://www.excelforum.com/excel-prog...2-columns.html
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Remove minus infront and behind of numbers in rang of cells

    HI Jindon. Sorry i have been going a little around in these codes. You code is really great. I just have 2 wishes. If i want it to display if the difference is minus or plus, what do i change in the code? So it dont remove the minus, but display it instead
    And also can you build these function into your code. I have this code below i use.

    SIncerely

    Abjac

    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: Remove minus infront and behind of numbers in rang of cells

    Not really sure how you want it.
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Remove minus infront and behind of numbers in rang of cells

    HI Jindon sorry for not explaining it good. Your code is a step on the way. It find the difference and color the cells with red. Thats is fine.
    how can i change your code so it display minus and plus numbers, instaed of now where it remove the minus? Just want to know if i will change it.

    And also your last code. How can macro Call ColorNonDuplicates10 be put into your code?

    Hope its more clear, but your code is really fine, and its nearly there.
    Sinncerely
    Abjac

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: Remove minus infront and behind of numbers in rang of cells

    Replace the formula back to the original
    Please Login or Register  to view this content.

  10. #10
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,102

    Re: Remove minus infront and behind of numbers in rang of cells

    OK great jindon Thanks allot. I will mark this as solved. Sorry for be a little confused about this thread. But i am really greatefull for the help.

    Thanks

    Sincerely

    Abjac

+ 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