+ Reply to Thread
Results 1 to 5 of 5

VBA to move data down a row and to the left

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    usa
    MS-Off Ver
    Excel 2007
    Posts
    40

    VBA to move data down a row and to the left

    Hey there,
    What I have is an excel spreadsheet that gets exported out pretty ugly. What I am hoping to do is for VBA (or other suggestion?) to look down a colum and if there is data there grab what is there and to the right of it and move down a row. (hope that is good enough explanation) I am going to include a sample file to help explain.
    So Look down colum F if data grab what is in colum F, G, H, I and move it down 1 row and to the left but to leave column E.. So F1,G1,H1,I1 would get moved down to A2,B2,C2,D2 and so on.

    If any one can lead me in the right direction you will be such a big help.. Thanks


    Export Sample.xls

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to move data down a row and to the left

    You attached desired result, can I see source data ? There is a blank row between each line ?
    If solved remember to mark Thread as solved

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to move data down a row and to the left

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: VBA to move data down a row and to the left

    Hi, John,

    shouldnīt be (no matter whether cut or copy) since you move down Column F:
    Please Login or Register  to view this content.
    Canīt help but patel45 has asked an essential information here:

    There is a blank row between each line ?
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to move data down a row and to the left

    Quote Originally Posted by HaHoBe View Post
    Hi, John,

    shouldnīt be (no matter whether cut or copy) since you move down Column F:
    Please Login or Register  to view this content.
    Canīt help but patel45 has asked an essential information here:


    Ciao,
    Holger
    Hi Ciao:

    If you use copy vrs cut on the sample data, you'll get a different result. I used cut because I thought that produced the result the OP requested. I agree with patel45's question, however I took in consideration of the blank row between each line by offsetting the activecell 2 instead of 1 to select the next cell. I'm not certain this will satisfy the OPS needs. Just a guesstimate.

+ 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. [SOLVED] Move data to empty left cell
    By JawadAhmed in forum Excel General
    Replies: 5
    Last Post: 05-04-2020, 05:53 PM
  2. To copy, move, and then delete old row of data left.
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-22-2012, 04:05 AM
  3. Need to move data from cell to the left
    By eddielong in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-01-2011, 11:10 AM
  4. How to move data to the left most field
    By chad14q in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-13-2010, 01:21 PM
  5. cell data move to left
    By lapot in forum Excel General
    Replies: 3
    Last Post: 05-18-2007, 08:04 PM

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