Consulting

Results 1 to 6 of 6

Thread: Unexpected Numerical Value in Table When Adding Blank Line

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Feb 2019
    Location
    Alresford
    Posts
    30
    Location

    Unexpected Numerical Value in Table When Adding Blank Line

    I am using Excel 2016 and have written VBA code to insert a blank line in a table. When the blank line is inserted, one of the cells also gets filled with the value 39.08 which, affording to the cell value comes from -35.5 + 5.58. The uploaded Word file shows the problem in more detail. I have no idea why this value appears in that cell. I would be grateful for any advice.
    Attached Files Attached Files

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Post the workbook, much more helpful than some pictures.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Regular
    Joined
    Feb 2019
    Location
    Alresford
    Posts
    30
    Location
    I have uploaded an anonymised worksheet. Hopefully it will help to identify where the problem value in the cell comes from.
    Attached Files Attached Files

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Very odd isn't it? When I did it, it created a formula 0f =33.5+5.58.

    I can only think there was some memory formula in the table, but the way I 'sorted' it was to remove the new line. then delete all the 33.5 values, then reinserted them. When I inserted a line then, it left that column blank.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Regular
    Joined
    Feb 2019
    Location
    Alresford
    Posts
    30
    Location
    I tried deleting all the values in the table and then inserting new rows and then deleting the rogue values/rows. Repeating the inserting of rows got me the same problem (see image). Please provide details of exactly how you managed to fix the problem.
    Attached Images Attached Images

  6. #6
    VBAX Regular
    Joined
    Feb 2019
    Location
    Alresford
    Posts
    30
    Location
    I think I have managed to solve the problem. I converted the table to range values and then set up the table again. When I inserted a new row the rogue value did not appear. Thanks for you help.

Posting Permissions

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