Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP forum
Answered

Remove trailing zeros

Posted on by Microsoft Employee

I am pulling in a dollar amount from excel via a macro but the field in GP is pre populated with $0.00 and it just gets appended to the end. How can I remove the trailing 0s? Amount should be $118,656.33

  MoveTo field 'Purchases Amount' 
  TypeTo field 'Purchases Amount' , '«Rebate_Amount»'

pastedimage1588965832660v1.png

Categories:
  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Remove trailing zeros

    Thanks for the reply. Now it gives me a "window not active" error.

    Edit: created new batch and it worked. Thank you!

    Edit2: hmm it only works for the first transaction in the batch

    Edit3: it worked when I format the cells in excel as text. Thanks.

  • Verified answer
    Hokuminaria Profile Picture
    Hokuminaria 2,950 on at
    RE: Remove trailing zeros

    Hello Carrot,

    Thank you for posting your questions!

    As we don't support Macros in GP Support, i don't have a lot of info that i can provide. However, the Community might.

    With your Excel file, are you using decimal places or just whole numbers? With GP, when we manually type a value it, it always starts at the last decimal place. If your excel file is using decimal places, try formatting the cell to be a whole number. 

    Example:

    12345.67 would be 1234567.

    Test your macro and see if that now comes into GP as 12345.67.

    If this works, for the ones that do not have a decimal places, you would need to have those cells include the .00 and the ones with cents be 123456.

    If this does not help, hopefully the community can provide insight if they have experienced this in the past.

    I hope this helps!

    Microsoft Support Engineer | Brandon Jarrett

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,558 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,647 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Product updates

Dynamics 365 release plans