+ Reply to Thread
Results 1 to 4 of 4

Need to multiply my discount amount by -1

  1. #1
    Registered User
    Join Date
    08-22-2021
    Location
    Portugal
    MS-Off Ver
    Excel 2021 Mac
    Posts
    78

    Need to multiply my discount amount by -1

    I am using MS Excel 2021 Mac.
    I am using some VBA code that works just fine.
    I copied the logic that inserts the "Tips" amount for a sales transaction to also insert a new row if there is a discount amount. See block "Insert discount row".
    The discount amount is in column K as a negative number.

    here is my code

    Please Login or Register  to view this content.
    I get an error on this line where I want to multiply the discount amount by -1.
    Union(.Columns("J"), .Columns("L"), .Columns("AE")).Value = .Parent.Range(("K" & i) * -1)

    The discount amount in the excel has to be a positive number, as it is converted to a negative amount when I import it into Quickbooks.

    What am I doing wrong?
    Last edited by gerdgoebel; 04-14-2024 at 12:09 PM.

  2. #2
    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,467

    Re: Need to multiply my discount amount by -1

    Try this:

    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


  3. #3
    Registered User
    Join Date
    08-22-2021
    Location
    Portugal
    MS-Off Ver
    Excel 2021 Mac
    Posts
    78

    Re: Need to multiply my discount amount by -1

    Thank you very much, TMS,

    this worked.

    I am so glad that this forum exists. I always got very professional and fast help.
    Gerd

  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,467

    Re: Need to multiply my discount amount by -1

    You're welcome.



    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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] How to calculate percentage to match old discount amount
    By avk in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-11-2024, 04:14 AM
  2. [SOLVED] Calculate the Discount amount i got on VAT invoice
    By HiS2oKa in forum Excel General
    Replies: 9
    Last Post: 10-17-2022, 09:37 PM
  3. [SOLVED] Formulate discount based on total amount
    By jaredxeon in forum Excel General
    Replies: 2
    Last Post: 06-04-2022, 04:38 AM
  4. [SOLVED] Different discount for different products amount
    By AugustsD in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-30-2015, 07:28 AM
  5. [SOLVED] [SOLVED} array of discount multiply to array of amount
    By kirby21 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-03-2014, 11:31 PM
  6. How do I discount by % not amount
    By GaryPip in forum Excel General
    Replies: 18
    Last Post: 12-03-2009, 09:02 PM
  7. Discount based on amount?
    By seaniexxx in forum Excel General
    Replies: 2
    Last Post: 02-06-2009, 06:14 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