Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Assume Decimals

  1. #1
    Guest

    Default

    I am having a problem writing a piece of code in excel to move a dollar figure ie. 458.23 to 45823. The bank wants to assume the decimal then format it. So it would look something like this 000000045823. It has to be in VB because I import all the info from a text file format it and convert it back to a txt file for the bank.

  2. #2
    Board Regular Steve Hartman's Avatar
    Join Date
    Feb 2002
    Location
    Houston,Texas
    Posts
    417
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Why not just multiply by 100?

  3. #3
    Guest

    Default

    I need a piece of code. I am using numberformat in VB to assume the "0" in front of the amount. I need something to either move the number to the left 2 spaces. Or a formula to use inside the cell to multiply by 100

  4. #4
    Board Regular Steve Hartman's Avatar
    Join Date
    Feb 2002
    Location
    Houston,Texas
    Posts
    417
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    How is the text file you import laid out? One column or multi column? If Multi column, how is it delimited? You should be able to do the multiplcation when you import the file.

  5. #5
    Guest

    Default

    The file is delimited with comas. Do you know code that would multiply when I import it?

  6. #6
    Guest

    Default

    I have time to explain a little now. I have a checking statement that gets exported from a UNIX box. It exports account number, check number, amount, and date. They all have to have leading "0" which I did with formatnumber. I have everything working except the amount field when I export. When I format the amount I lose the decimal. So if the txt file from the UNIX system says 452.23 I import it, format it using formatnumber("000000000000"). I get 000000000452. I am missing something simple.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •