+ Reply to Thread
Results 1 to 9 of 9

Moving rows based on formatting

  1. #1
    Registered User
    Join Date
    02-04-2011
    Location
    Olkusz
    MS-Off Ver
    Excel 2007
    Posts
    43

    Moving rows based on formatting

    Hello!

    Today I have something I don't know even how to start.
    Therefore, I don't have "starting" code that may be amended.

    If it is not too complicated I need a macro, that moves all rows marked with yellow color to the second worksheet.
    There is no need to make target rows/columns adjusted.
    There may be no empty rows in first worksheet, so after moving a row to second worksheet, the empty one must be removed.

    The best solution is to have a macro in separate worksheet, so that it can work on any file opened when file with macro is opened "in the background".
    (for example by assigning a keyboard shortcut)


    I attach an example files. One with start data and the second one with the desired effect.

    PS. IF IT REQUIRES A LOT OF WORK FROM ANY OF YOU, YOU MAY IGNORE THIS THREAD...
    Attached Files Attached Files
    Last edited by bukimiak; 02-22-2011 at 08:31 AM. Reason: solved

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

    Re: Moving rows based on formatting

    Do you mean move all the rows which aren't coloured yellow? Are you colouring them manually?

  3. #3
    Registered User
    Join Date
    02-04-2011
    Location
    Olkusz
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Moving rows based on formatting

    I want to move ONLY yellow-coloured rows.

    Some rows are yellow, some are not-coloured.
    I want to sort them into separate sheets.
    (normal in 1st sheet, yellow in 2nd sheet)

    You may see the attachment if it is not 100% clear.

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

    Re: Moving rows based on formatting

    Please don't assume that I can't read or am unable to look at attachments.

    Your finish file has all the rows which are NOT coloured yellow.

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Moving rows based on formatting

    hi, if I'm not mistaken Excel 2007 has an in-built filter by color ...

  6. #6
    Registered User
    Join Date
    02-04-2011
    Location
    Olkusz
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Moving rows based on formatting

    I am sorry if you felt offended. I just tried to explain it more.

    Please see "finish.xls" file.
    1st sheet - only not coloured rows.
    2nd sheet - only yellow rows.

    That is, all yellow rows from 1st sheet got moved to 2nd sheet.

    (maybe I am explaining it wrong way?)

    Quote Originally Posted by watersev View Post
    hi, if I'm not mistaken Excel 2007 has an in-built filter by color ...
    Could you tell me a bit more about it? Sounds promising
    Last edited by bukimiak; 02-22-2011 at 08:09 AM.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Moving rows based on formatting


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

    Re: Moving rows based on formatting

    I'm not offended, you seemed to be under the impression I was querying your file without having looked at it. I see now you have split the second file into two sheets. watersev's approach would appear to be the way to go, though you'll need to add a header row.

  9. #9
    Registered User
    Join Date
    02-04-2011
    Location
    Olkusz
    MS-Off Ver
    Excel 2007
    Posts
    43

    Re: Moving rows based on formatting

    Quote Originally Posted by watersev View Post
    Looks that it can do the trick
    I filter rows by color, then I can move them all at once to the other sheet.
    It does not take much time so automated version is not needed

    I am used to previous versions of Excel and was unaware of that option.

    THANKS FOR THE TIP!

+ 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