+ Reply to Thread
Results 1 to 11 of 11

Copy and paste negative values

  1. #1
    Forum Contributor
    Join Date
    01-22-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    125

    Copy and paste negative values

    I'm using this to copy and pate negative values.

    Is it possible to change values close to zero, as being zero, if within 0.001.


    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    08-08-2022
    Location
    Buenos Aires
    MS-Off Ver
    Excel 2019
    Posts
    1,777

    Re: Copy and paste negative values

    Hello. The best thing would be for you to upload a worksheet to the Forum with a couple of specific examples (10 will be enough) in which we can see what you have and what you want to achieve (you put the latter "by hand").

  3. #3
    Forum Contributor
    Join Date
    01-22-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    125

    Re: Copy and paste negative values

    Hi, the code just copies and pastes to negatives (see attachment).
    Just wanted to know if values close to zero can be made zero.

    Attachment 798312

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Copy and paste negative values

    Try:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Forum Contributor
    Join Date
    01-22-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    125

    Re: Copy and paste negative values

    Thanks TMS, this definitely works.
    I should have mentioned that the data will end up being thousands of rows and more columns, and was trying to avoid making reference to the worksheet as this makes the macro slow.
    It may be that arrays have to be used but I wasn't sure how to do it with arrays to make it quick.

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

    Re: Copy and paste negative values

    Please Login or Register  to view this content.

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Copy and paste negative values

    You're welcome. Thanks for the rep.

    Looks like jindon has the solution.

  8. #8
    Forum Contributor
    Join Date
    01-22-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    125

    Re: Copy and paste negative values

    Thanks jindon, this works really quickly with more than 10k rows of data.
    Cheers.

  9. #9
    Forum Contributor
    Join Date
    01-22-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    125

    Re: Copy and paste negative values

    jindon, is it possible to paste to another worksheet.
    I've tried but all the pasted values are the same as cell A2 in Sheet1.

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

    Re: Copy and paste negative values

    Please Login or Register  to view this content.
    Sheet1 = source data sheet
    Sheet2 = output sheet.

  11. #11
    Forum Contributor
    Join Date
    01-22-2022
    Location
    UK
    MS-Off Ver
    365
    Posts
    125

    Re: Copy and paste negative values

    Thanks once again jindon, this works really well.

+ 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. [SOLVED] Macto to copy non zero items and convert values to negative values
    By Howardc1001 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-09-2022, 01:13 AM
  2. Paste item code of negative values based on a few things.
    By Flaughtbread in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2021, 09:05 AM
  3. [SOLVED] If matches along with negative numbers then copy paste
    By dumdumbum in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-10-2020, 02:14 AM
  4. Replies: 1
    Last Post: 03-01-2020, 12:27 AM
  5. [SOLVED] Check for negative values and paste text (without using loop)
    By kaptenstofil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-25-2014, 06:15 AM
  6. [SOLVED] Copy paste the data with no negative using the conditions
    By tharindudk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2013, 08:01 PM
  7. To paste negative values in adjacent cells
    By viveksingh222 in forum Excel General
    Replies: 2
    Last Post: 07-20-2013, 04:23 AM

Tags for this Thread

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