+ Reply to Thread
Results 1 to 6 of 6

Cells are pasted with extra empty line

  1. #1
    Registered User
    Join Date
    04-06-2020
    Location
    Europe
    MS-Off Ver
    Office365
    Posts
    41

    Cells are pasted with extra empty line

    I am building an automation tool that pastes data in Excel.

    For some reason it always puts an extra line after the data. This is not a huge problem until the import is supposed to be in numbers.

    Due to the extra line I get a lot of #VALUE! when I try to make calculation with the imported data.


    Is there a way with a formula, for example the same value in A2 as in A1, but then A2 without the extra line so I have numbers where I can work with?

    Thank you!

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Cells are pasted with extra empty line

    In A2 you could try using =TRIM(A1), but probably best to fix the problem at the source rather than fix it afterward.

    BSB

  3. #3
    Registered User
    Join Date
    04-06-2020
    Location
    Europe
    MS-Off Ver
    Office365
    Posts
    41

    Re: Cells are pasted with extra empty line

    I tried that, but I think TRIM only changes it visually and I'm still not able to make calculations with the new Trimmed cell.

    Thank you for your time!

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Cells are pasted with extra empty line

    TRIM will remove extra / trailing spaces and things like that.

    Could be formatted at text. There are ways to fix that.

    Paste a sample workbook so we can take a better look.

    BSB

  5. #5
    Registered User
    Join Date
    04-06-2020
    Location
    Europe
    MS-Off Ver
    Office365
    Posts
    41

    Re: Cells are pasted with extra empty line

    Thanks,

    I included a sample workbook.
    Attached Files Attached Files

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Cells are pasted with extra empty line

    Try CLEAN in place of TRIM

    BSB

+ 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. returning totals line in sheet with extra empty columns and rows
    By sjferrera in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-20-2017, 01:51 PM
  2. Trying to copy fixed row of cells, paste to next empty line, and clear fixed line.
    By oh_stanley in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-24-2014, 07:44 PM
  3. [SOLVED] VBA - Copy/Pasted range to shift up if there are empty cells in b/w
    By fullspeed in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-30-2014, 06:06 PM
  4. [SOLVED] If one cell in line turn empty then entire line turns empty
    By Cristy0505 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 07-19-2013, 06:02 AM
  5. Search for a line in all Modules in a workbook and add extra line below
    By sans in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-20-2013, 03:17 PM
  6. Add extra line, shift cells dwn
    By Navhonda84 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-25-2010, 11:32 AM
  7. Replies: 0
    Last Post: 07-06-2010, 06:46 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