+ Reply to Thread
Results 1 to 8 of 8

Exporting filtered data to new workbook issue

  1. #1
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Exporting filtered data to new workbook issue

    Hi guys.

    VBA novice, so be gentle with me.

    I am using the VBA coding below for users to export the contents of a worksheet to another workbook.

    This works great until the data is filtered, which then throws up a 'Error 1004 - We can't do that to a merge cell'. Any work around?

    Please Login or Register  to view this content.
    On another note, some users are getting a "Go To of Object - Application Failed" message....seperate issue I know, but thought I would throw 2 at you at once

    Thanks

    D

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Exporting filtered data to new workbook issue

    Merged cells are notoriously bad when using macros. Can you design your worksheet so as to not have any merged cells? Maybe use Center Across Selection instead. It's located on the Format Cells dialog\Alignment tab\Horizontal Alignment
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Exporting filtered data to new workbook issue

    But why would it export fine until you filter? The merged cells are still there in either scenario.

    Thanks

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Exporting filtered data to new workbook issue

    That's my point. Merged cells have unpredictable limitations. You just found one. There are others.

  5. #5
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Exporting filtered data to new workbook issue

    Thanks for your reply. I have added ActiveSheet.Cells.UnMerge at the beginning of the script. It will look at bit messy in parts, but that is less important

    What about the GO TO OBJECT APPLICATION FAILED issue? Or am I pushing my luck?



    D

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Exporting filtered data to new workbook issue

    I don't see a GoTo statement, so I'm clueless on that one.

  7. #7
    Registered User
    Join Date
    09-20-2014
    Location
    London
    MS-Off Ver
    Excel 2013
    Posts
    98

    Re: Exporting filtered data to new workbook issue

    Same here :os It is only one person that has reported that to me, so hoping it is just a one off. Thanks for your help.

  8. #8
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Exporting filtered data to new workbook issue

    You're welcome.

+ 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. Having an issue with a sumproduct formula once filtered data
    By jando4 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-14-2016, 05:52 PM
  2. [SOLVED] Filtered Data - Inserting Blank Row at the Beginning. Issue
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-12-2014, 05:32 AM
  3. [SOLVED] Excel VBA - Issue in Naming Filtered Range on a Filtered List.
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-06-2014, 01:17 PM
  4. Exporting data to another workbook
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-22-2013, 01:07 PM
  5. Filtering in another workbook, copying filtered data and pasting in source workbook
    By saadtariq in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2012, 12:55 PM
  6. Importing and Exporting data from workbook to workbook in excel
    By dans123 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-09-2012, 03:40 AM
  7. Issue with copy/paste dates from filtered data
    By deacs in forum Excel General
    Replies: 3
    Last Post: 01-05-2006, 11:10 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