+ Reply to Thread
Results 1 to 5 of 5

Moving data from filtered sheet to other sheets

  1. #1
    Registered User
    Join Date
    08-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    5

    Moving data from filtered sheet to other sheets

    Hello Excel helpfuls!

    I have created a macro which takes a large amount of data from one worksheet, filter it by each value in a column one at a time and copy the filtered results over to various sheets.

    Sheet 1 is "Input Data" and sheets 2-36 are various sheets based on the data in "Input Data" column B.

    My problem arises if the filter returns no values. This creates an issue during the program running because it tries to copy 0 cells over to the other sheet. This always causes the program to crash. Is there any way to fix this?

    I have a macro that runs the macro for each sheet and have just been commenting off the ones that are full, but I would love a way for it to be done automatically. Here is an example of one of the macros:

    Please Login or Register  to view this content.
    Also a way to know when it's more than so many lines so I can split it in to two sheets would be greatly helpful!

    I hope I made that clear. I haven't had my coffee yet this morning!

    ---------- Post added at 12:53 PM ---------- Previous post was at 09:21 AM ----------

    I didn't read the ToS for this forum but I'm going to give myself a bump here. Any help would be greatly appreciated!
    Last edited by arlu1201; 08-03-2012 at 07:58 AM. Reason: Added code tags for newbie.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Moving data from filtered sheet to other sheets

    I didn't read the ToS for this forum but I'm going to give myself a bump here. Any help would be greatly appreciated!
    If your question has not been answered within a day, consider adding another post with any additional information you believe is relevant. If you think your post is good as is, just reply to your own thread with the words "Bump no response", which will bring it to the top of the forum.
    Last edited by arlu1201; 08-03-2012 at 07:58 AM.
    Ben Van Johnson

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving data from filtered sheet to other sheets

    Cjdaw,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Moving data from filtered sheet to other sheets

    You could try something like:

    Please Login or Register  to view this content.
    Since that last line will count the two header cells.
    Last edited by protonLeah; 08-03-2012 at 07:19 PM.

  5. #5
    Registered User
    Join Date
    08-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Moving data from filtered sheet to other sheets

    Thanks. Changed this to solved and posted a message before but I guess it didn't go through? Bah. My apologizes

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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