+ Reply to Thread
Results 1 to 5 of 5

Fixing A Data Export Issue

  1. #1
    Registered User
    Join Date
    04-04-2009
    Location
    N/A
    MS-Off Ver
    Excel 2003
    Posts
    24

    Fixing A Data Export Issue

    Hi

    I have a bit of a bizarre problem when exporting data out of a certain system. There is a known bug where sometimes it splits data, that should be on 1 line, across 2 lines. It's always done in the same way, and I'd like to write a macro to do the following:

    - Search column B for "12"
    - If it finds it, highlight the 11 cells next to it (including that cell), and cut it
    - Find the next populated row up, move along to column L and paste it

    I'm not sure I can do this all in one step, or if I need to move cell by cell. But any help on this would be fantastic.

    Cheers.
    Attached Files Attached Files
    Last edited by McNulty; 12-21-2009 at 01:04 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Fixing A Data Export Issue

    So, are you saying that in your example B7:L7 would be moved to L5?

  3. #3
    Registered User
    Join Date
    04-04-2009
    Location
    N/A
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Fixing A Data Export Issue

    Hi Stephen - exactly. But obviously my data export is a lot larger, and can happen multiple times across the board. I can write something to delete blank rows so that isn't really a concern.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Fixing A Data Export Issue

    Try this. The last line deletes blanks so remove if you don't want that.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-04-2009
    Location
    N/A
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Fixing A Data Export Issue

    That's superb, had to amend the 12 to match my actual data and wrap it in quotes, but the code works perfectly. Thankyou so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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