+ Reply to Thread
Results 1 to 18 of 18

Auto Filter Paste Error

  1. #1
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69

    Auto Filter Paste Error

    Hello,

    I'm running Excel 2003 and I have a workbook with an Auto List in Column G. When I attempt to paste a row of data I get the following message.

    The operation is not allowed. the operation is attempting to shift cells in a list on your worksheet.

    To work around this, I have to convert the list to a range, copy the data and then reapply the Auto List.

    Is there another way to work around this or will I have to create vba code or record a macro?

    Thanks,
    Chris

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I can't be sure from the description but it sounds like you are trying to insert a row which pushes over data off the sheet.

    See what your last used cell is by pressing F5 > special > lastcell

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Hello VBA Noob,

    I did what you suggested and the lastcell is 1 row below the last row of data and 1 column to the right. Not sure what that indicates.

    I attached a sample worksheet. If you select a row, copy it and then insert copied cells you will see the error that I noted. The auto list you'll see is in G8.

    Chris
    Attached Files Attached Files

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    The attachment allows me to insert a row manually and by using the macro InsertBlankRow

    Have you tried to close the file and reopen it?

    VBA Noob

  5. #5
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Hi Noob,

    I have no problem inserting a blank row. The problem occurs when I copy a row with data, such as row 19 and then insert copied rows above row 14 as an example.

    In my main workbook I will have to paste rows of new projects from a different workbook into my main one.

    For testing purposes I'm doing the copy and paste in the same worksheet.

    Chris

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi Chris,

    Again I had no issues. Maybe transfer the info into a new workbook?

    VBA Noob

  7. #7
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Interesting. The only way that I can successfully insert copied cells if I first convert the list to a range and then paste the row. After the row has been pasted I have to recreate the auto list.

    I'll try your suggestion and report back.

    Chris

  8. #8
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Hi Noob,

    I transferred the info to a new workbook, test5.xls that I attached to this post and I still get the error. If you could can you please follow the following steps and see if you can reproduce the error?

    1) Verify that you see the LIST in G8. I created this by selecting LIST from the DATA menu and then selecting the cells in Column G. When you click on that cell you should see a down arrow that when you click on you'll see the following listed.

    SWD Blades
    SWD NAS
    SWD Nearline

    2) Click on Row 14 and copy it to the clipboard

    3) Right Click on Row 10 and Insert Copied Cells

    You should get the error.

    Chris
    Attached Files Attached Files

  9. #9
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    1) Verify that you see the LIST in G8. I created this by selecting LIST from the DATA menu and then selecting the cells in Column G. When you click on that cell you should see a down arrow that when you click on you'll see the following listed.
    No data validation on that workbook or the first workbook. I press F5 > special > data validation on both sheets

    VBA Noob

  10. #10
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Thanks Noob,

    This is the first time that I applied a LIST in a workbook. What would you recommend I set data validation to?

    I tried setting it to LIST and then selected the cells in column G. When I attempt to insert copied cells I get the following message.

    This operation is not allowed. The operation is attempting to shift cells in a list on your worksheet.

    Chris

  11. #11
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I would store a list of unqiue items in another worksheet

    http://www.contextures.com/xladvfilter01.html#FilterUR

    Then name the range
    http://www.contextures.com/xlDataVal01.html#Name

    Then refer to the name range
    http://www.contextures.com/xlDataVal01.html#Apply

    You can hide the sheet with the list if you wish to avoid people changing the list

    VBA Noob

  12. #12
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Thanks Noob. I'll give this a try.

    Chris

  13. #13
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Hello VBA Noob,

    I reviewed the information on the provided links and attempted to implement this on my spreadsheet but it isn't working the way that I require.

    What I need is when a selection is made from the G8 LIST then only the rows that meet that criteria are displayed. Currently all that is happening is, I make a selection from the list and only the name in cell G8 changes. Nothing is filtered. For example, if I select SWD Nearline then only rows 18 and 19 should be displayed.

    The attached spreadsheet contains my attempt.

    I am hoping that you can fill in the blanks so that it works as desired.

    Thanks,
    Chris
    Attached Files Attached Files

  14. #14
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    This post has now gone way off course. What happen with the orginial problem ??

    Try this event macro. Right click sheet name (Business Sub Group) > select view code > paste in the below

    Please Login or Register  to view this content.
    VBA Noob

  15. #15
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Hi Noob,

    I don't believe we strayed off course. If anything I may not have explained the problem clear enough.

    The good news is that I copied your code to the sheet module and now I can filter the list by Business Sub Group and I can Copy rows and Insert Copied Cells without any problem.

    There are 2 more questions for you. If I click on cell G8 I see 2 list arrows displayed. I can click on either one, select the sub group and the list is filtered correctly. Is there anything that can be done so that only 1 arrow is shown?

    Lastly, when I select a sub group the Header changes to that selection. Is there any way to keep the Header as Business Sub Group?

    Thank you for your assistance and I'll try to be clearer in the future.

    Regards,
    Chris
    Attached Files Attached Files

  16. #16
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I would look at Advance filter then. See link

    http://www.contextures.com/xladvfilter01.html

    VBA Noob

  17. #17
    Registered User
    Join Date
    08-16-2008
    Location
    Edmonton, Alberta, Canada
    Posts
    69
    Will do!!! Thanks again.

    Chris

  18. #18
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Or just move the validation cell to G7

    Please Login or Register  to view this content.
    VBA Noob

+ 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. copy highlighted rows from Auto filter
    By tahirawan11 in forum Excel General
    Replies: 1
    Last Post: 06-19-2008, 12:00 PM
  2. Auto Filter
    By ryoichi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-18-2008, 10:18 AM
  3. Function for Auto Filter
    By mcaballes in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-07-2007, 03:04 PM
  4. auto filter
    By sach0025 in forum Excel General
    Replies: 3
    Last Post: 02-08-2007, 03:52 PM
  5. Custom Auto Filter for more than two cells
    By coopster in forum Excel General
    Replies: 2
    Last Post: 02-07-2007, 09:23 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