+ Reply to Thread
Results 1 to 4 of 4

Macro to Flip Integer

  1. #1
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Macro to Flip Integer

    I have a simple macro that takes the content from a source cell and moves it to a target cell at the bottom of a table, then clears the contents of the source cell:

    Please Login or Register  to view this content.
    In this case, the contents of the source cell will always be numeric.

    I need a way to modify this macro so that when it is run, it flips the integer of the numeric value in the source cell, possibly just by multiplying by -1.
    In other words, if the data in the source cell was 200, when the macro moves the data, it needs to flip it to be -200.

    I appreciate any help with this!

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,976

    Re: Macro to Flip Integer

    You could simply use:

    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    01-16-2020
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    171

    Re: Macro to Flip Integer

    Oh wow, that was really easy. Thank you so much!

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,976

    Re: Macro to Flip Integer

    Glad to help, and thanks for the rep.

+ 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] Flip copy paste values using Macro, first row already fill with the data
    By Sultan1994 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2022, 06:17 AM
  2. Modify contents of cell from an integer into that integer multiplied by a percentage
    By Mergerock in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2021, 01:10 PM
  3. [SOLVED] Improving existing macro to flip data
    By axtryo in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-20-2017, 03:05 AM
  4. [SOLVED] Transposing Data Macro (flip columns)
    By nikeskopje in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2015, 02:12 PM
  5. [SOLVED] Need to Transpose and Flip Table of Data - Macro Probably Needed
    By BobTomlinson in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-08-2013, 09:25 AM
  6. Replies: 3
    Last Post: 10-27-2011, 05:20 PM
  7. Count the number of occurrences of an integer withing a larger integer
    By nnktran in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-26-2010, 01:04 PM

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