Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3232524
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:10:16+00:00 2026-05-17T17:10:16+00:00

Hey all, I managed to integrate my Database quite well with Excel in the

  • 0

Hey all, I managed to integrate my Database quite well with Excel in the end, but in the end after I showed it to the bosses they asked me to develop the forms and reports in Access again. That did not take too long fortunately, so I ended up doing two front ends for one back end Database. But in the end it’ll be a fully Access database with only one bit of Excel integration utilized; basically the transfer spreadsheet method to transfer daily end of trade Share price into Access.

Now I’ve come to a point where the database is pretty much ready to be split and populated.(What’s the best way to tackle this, populate first or split first?)

The question I’m asking is below:

This might seem like a fairly simple question but so far, I haven’t been helped with google or maybe I’m not using the right keywords in my search so I thought what better place to ask then on here; Is there a way to format the numbers that are generated through some VBA code and placed in a new table in Access, to make them look like:

So if it’s 1,000,000 then it would appear as 1m
Or if it’s 10,000 then it appears as 10k
So basically if it has three 0’s then it’s a K
If it has six 0’s then it’s an M

I have used some VBA initially to format the numbers in the following way:

ChangeInShare = Format(ChangeInShare, "#,##.00")

But then the request came to shorten some numbers down to make the reports look neater.

The final table, takes the values in a Text format btw.

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T17:10:16+00:00Added an answer on May 17, 2026 at 5:10 pm

    You can use the modulo operator to test if the number is dividable by 1000000 or by 1000 and then replace the last zeros.

    Maybe this function points you to the right direction:

    Public Function fmt(val As Long) As String
      Dim result As String
      If val Mod 1000000 = 0 Then
        result = (val \ 1000000) & "M"
      ElseIf val Mod 1000 = 0 Then
        result = (val \ 1000) & "K"
      Else
        result = val
      End If
      fmt = result
    End Function
    

    Then some test calls:

    ? fmt(471000)
    471K
    ? fmt(4711)
    4711
    ? fmt(4000000)
    4M
    ? fmt(40000)
    40K
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey all I've just been fooling around with the HTML5 Database API and I'm
Hey all i am trying to delete a key from the registery but i
Hey all. To be honest, I don't prefer MS Access as a relational database
Hey all i am probably overthinking this but how can i check the textbox
Hey all, I don't know how to properly phrase this but when I run
Hey all - I have an app where I'm authenticating the user. They pass
Hey all. We're sending quite a few emails (around 23k) using IIS6 SMTP service
Hey all, I want to change a value in a table (in a mysql
Hey all. Is there a way to copy only a portion of a single
Hey all. I'm wondering how to implement a timeout event in the System.Windows.Forms.Webbrowser control?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.