+ Reply to Thread
Results 1 to 12 of 12

cut and pasting data

  1. #1
    Registered User
    Join Date
    12-28-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    54

    cut and pasting data

    Hello,

    I hope you might be able to assist me with this query. I want to know if a vba can be created to find a value in a cell then cut and paste the data within a range to the next cell below. Example, in cell L is a value of 'x', I want to then cut cells E-O of that same row and paste it to the next row down, this will be done to all Values of 'x' in Cell L. My sample shows the Value of 'x' in Cell L.

    CheerZ!
    Wyldjokre69

    Please Login or Register  to view this content.
    Sample.xlsb
    Please Login or Register  to view this content.
    Last edited by wyldjokre69; 06-11-2014 at 04:12 AM. Reason: Wrong File

  2. #2
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: cut and pasting data

    Do you want to overwrite the information in the row below or do you want to insert a new blank row and copy it there?

  3. #3
    Registered User
    Join Date
    12-28-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    54

    Re: cut and pasting data

    overwrite the information below by cutting rows E-O and pasting it in the next row below, so that the names in rows D & K match.

  4. #4
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: cut and pasting data

    Ok - so in column L the second x should be in row 4 if I understand. I will code something in a second, have to go eat some cakes for a birthday quick.

  5. #5
    Registered User
    Join Date
    12-28-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    54

    Re: cut and pasting data

    yes, that is correct, eat a slice for me as well...trying to lose weight here...

  6. #6
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: cut and pasting data

    If you get the x in the right places this should work, I can make it so it just looks off of the first column with a little more time. Sorry I am pretty busy today.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    12-28-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    54

    Re: cut and pasting data

    Hey Hawkeye16,

    It's looking good, but it's off a bit, if I send you a piece of coding that kind of helped as well do you thing you would be able to tweak it so that it would be fully functional. The problem with this piece of coding is that it does match the highlighted horses and all data inbetween, but it also removes data. I'm hoping with your help, you will be able to apply it and then send it to me where it doesn't make data vanish. I hope you're kewl with this. I know your busy, so I will send you the coding and await your response. Thanks a million for your assistance.

    CheerZ!
    Wyldjokre69

    Please Login or Register  to view this content.

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

    Re: cut and pasting data

    FWIW:

    Please Login or Register  to view this content.

  9. #9
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: cut and pasting data

    That code looks overly complex to me and it overwrites data because it copies partial row and pastes without moving the data that is in the destination first.

    Try this and let me know if it is what you want, if not I can build something into what you provided that makes it so it does not overwrite data. In the code I just provided it does not look at Column L, just matches the columns D and K which is what I suspect is the final goal.

    Please Login or Register  to view this content.
    Last edited by Hawkeye16; 06-11-2014 at 08:54 AM.

  10. #10
    Registered User
    Join Date
    12-28-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    54

    Re: cut and pasting data

    It doesn't quite finish the job, would you be able to tweak the coding I sent you to not take out the additional info, that would be awesome.

    CheerZ!
    Wyldjokre69

  11. #11
    Registered User
    Join Date
    12-28-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    54

    Re: cut and pasting data

    Hello Hawkeye16,

    Wow, you did it, I re-tried your code and it worked all the way to the last cell that was needed.

    Thank you very much for your assistance, please disregard my last reply. I'm closing this query and giving you a reputation point.

    CheerZ!
    Wyldjokre69

    This is the coding that worked it's magic:
    Please Login or Register  to view this content.
    Last edited by wyldjokre69; 06-11-2014 at 08:52 AM. Reason: needed to add coding that worked.

  12. #12
    Valued Forum Contributor Hawkeye16's Avatar
    Join Date
    02-27-2013
    Location
    Holland
    MS-Off Ver
    ├•┤ Pew Pew
    Posts
    441

    Re: cut and pasting data

    Thanks for the rep! Glad it worked out.

+ 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. Unable to prevent copy pasting data that does not conform to data validation rules
    By Sree Varun in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-25-2013, 10:41 PM
  2. Replies: 1
    Last Post: 12-07-2013, 05:23 PM
  3. Pulling data from mutliple windows, and pasting the data in worksheets/tabs
    By msu4life in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-27-2012, 07:01 PM
  4. Replies: 1
    Last Post: 04-02-2011, 06:39 AM
  5. [SOLVED] Pasting on Filtered Data Sheets without pasting onto hidden cells
    By CCSMCA in forum Excel General
    Replies: 1
    Last Post: 08-28-2005, 09:05 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