+ Reply to Thread
Results 1 to 7 of 7

Changing display from negative to positive.

  1. #1
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Changing display from negative to positive.

    I trying to turn a list of negative numbers positive. Can someone please let me alter this code to do that. I guess i want the absolute value?


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Changing display from negative to positive.

    The simplest solution is to multiply the selected range by -1. Let's say you have put -1 in I6

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Changing display from negative to positive.

    Or do you want like

    Please Login or Register  to view this content.
    ?

  4. #4
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Changing display from negative to positive.

    is there a way to do it within the line of code to do it? Im afraid that is not working how i had hoped.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Changing display from negative to positive.

    Unless I am missing something, I do not think so. You have negative values and want to convert them into +ve, you can use a loop and change every single value.
    Last edited by AB33; 10-12-2016 at 03:52 PM.

  6. #6
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,872

    Re: Changing display from negative to positive.

    You only show a couple of lines of code without any other context. One thought that kind of, sort of is within the line of code is to have a helper column in the spreadsheet. I cannot tell If you are talking about the values being pasted into column K in the first line or the values being copied from AK in the second line. In either case, if the signed data is in K or AK, then a helper column (say in L or AL) with =ABS(K53) or =ABS(AK2) in it would calculate the unsigned values as fast as Excel could perform the calculate event (or as soon as your code executes a .calculate method, if you have calculation set to manual). Of course, that means that you can no longer look in K or AK for the unsigned values -- you have to look in L or AL, but that should be a straightforward adjustment.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  7. #7
    Forum Contributor
    Join Date
    05-05-2004
    MS-Off Ver
    Office 365
    Posts
    651

    Re: Changing display from negative to positive.

    Ok- as always you guys are spectacular with all of your help and I so appreciate you all.

    What I ended up doing was processing the report as I normally do but then at the end I ran a new macro that basically turned the area i needed to into a ABS and pasted it right back. Problem solved albeit ugly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Changing negative value to positive
    By Borg in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2006, 06:34 PM
  2. [SOLVED] Changing Positive to Negative
    By in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 12:05 PM
  3. [SOLVED] Changing Positive to Negative
    By Matthew Hackett via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. Changing Positive to Negative
    By in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  5. Changing Positive to Negative
    By Matthew Hackett via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. [SOLVED] Changing Positive to Negative
    By Matthew Hackett via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. [SOLVED] Changing Positive to Negative
    By Matthew Hackett via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  8. Changing Positive to Negative
    By Matthew Hackett via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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