+ Reply to Thread
Results 1 to 7 of 7

VBA putting a "#" behind my number

  1. #1
    Registered User
    Join Date
    01-03-2020
    Location
    U.S.A.
    MS-Off Ver
    365
    Posts
    11

    VBA putting a "#" behind my number

    This is a weird problem I have never encountered before. I have some code that converts the number to it's full usable form, 1B to 1,000,000,000 for example, and for some reason the VBA editor automatically puts the "#" symbol behind the trillion number, making it so that the trillion addition won't work. Why might this be?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,408

    Re: VBA putting a "#" behind my number

    That symbol is telling the compiler (when it activates) that the number is of data type Double (it cannot be a Long because it is larger than 2,147,483,647. Where is the code doing the "trillion addition"? Why don't you show us all of the relevant code so we can what you are doing which would help us in advising you how to fix it.

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: VBA putting a "#" behind my number

    What do you mean by 'the trillion addition won't work'? Also, Excel can't store VBA Decimal type values in cells. ALL VBA numeric values are converted to Double before those Double numeric values are entered into Excel cells.

  4. #4
    Forum Expert
    Join Date
    04-01-2013
    Location
    East Auckland
    MS-Off Ver
    Excel 365
    Posts
    1,343

    Re: VBA putting a "#" behind my number

    if it is confusing you, you can write 1000* 1000 * 1000 * 1000 for me that would be more readable anyway.
    If you want something done right... find a forum and ask an online expert.

    Time flies like an arrow. Fruit flies like a banana.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,519

    Re: VBA putting a "#" behind my number

    Could you use * (10000000 * 100000)
    * scottiex is faster

  6. #6
    Registered User
    Join Date
    01-03-2020
    Location
    U.S.A.
    MS-Off Ver
    365
    Posts
    11

    Re: VBA putting a "#" behind my number

    mmmmmmmmmmm

  7. #7
    Registered User
    Join Date
    01-03-2020
    Location
    U.S.A.
    MS-Off Ver
    365
    Posts
    11

    Re: VBA putting a "#" behind my number

    That is not even a problem here. Where did you get that from?

+ 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. Replies: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. Putting a " - " to different control number. Please help.
    By bluntmagic in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-27-2013, 07:44 PM
  4. Matching names in two columns and putting "P" or F"
    By meow13mix in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-27-2012, 04:19 PM
  5. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  6. [SOLVED] Re: macro for converting number stored as "text" (or preceeded with ') to "number" formatting
    By markx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-30-2006, 07:14 AM
  7. [SOLVED] macro for converting number stored as "text" (or preceeded with ') to "number" formatting
    By markx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-23-2006, 10:20 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