+ Reply to Thread
Results 1 to 8 of 8

Paste from one sheet to another sheet that gets autofiltered for position

  1. #1
    Registered User
    Join Date
    10-06-2021
    Location
    Blandon, Pennsylvania
    MS-Off Ver
    Office 365
    Posts
    14

    Paste from one sheet to another sheet that gets autofiltered for position

    Hello excel-lent people,

    I have a workbook that I've gotten some help from this site before that I am once again asking for assistance. In my workbook, I have a database with an ECO number (Order number) that has x amount of part numbers. One ECO can have 15 parts attached, or 50 parts attached, etc..
    I have a sheet where I am successfully calling up each ECO from the database with X amount of parts. What I want, is to be able to change any or all of the parts (Which machine has the program finished, etc...) and then click an "Update" button. I have everything "Done" but I am using autofilter on the database to only show the ECO number that was typed in, and I want to click on that first cell and paste. Since I'm not adding extra rows or anything like that, what am I doing wrong here?

    I will attach the workbook. The update section is in Module 3 and I have lines around it showing where I'm having the issue. I*Side note, is there a way to change module names?




    Thank you for any assistance you can provide!!!

  2. #2
    Registered User
    Join Date
    10-06-2021
    Location
    Blandon, Pennsylvania
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Paste from one sheet to another sheet that gets autofiltered for position

    Here is the workbook. It doesn't look like it attached!
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-06-2021
    Location
    Blandon, Pennsylvania
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Paste from one sheet to another sheet that gets autofiltered for position

    I keep getting an error when trying to include the module 3 code in here due to sucuri website firewall I'm being told!
    Last edited by ForgetfulMemoryFoam; 10-13-2021 at 11:26 AM.

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Paste from one sheet to another sheet that gets autofiltered for position

    I can not open the VBA UserForm - keep getting 'out of memory error'
    Suggest you remove what extra code you have added, then upload the base file, then load the new code between code tags so that we can read it and see what is wrong.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

  5. #5
    Registered User
    Join Date
    10-06-2021
    Location
    Blandon, Pennsylvania
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Paste from one sheet to another sheet that gets autofiltered for position

    Thank you for checking this out. I have attached a new file and since the userform you suggested in a previous thread works perfectly, I have removed that for the sample. I figured out how to change module names and now you should see a module called ECO update which is on the ECO Search tab as a button to click. I put a number (Thats in the database) in the ECO search, click search, and it populates the cells. When I change the status of a machine program or anything and click Update, pasting is where my problem lies.

    Let me know what you think and if this workbook opens properly.
    Attached Files Attached Files

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Paste from one sheet to another sheet that gets autofiltered for position

    I am having difficulty trying to envisage what you are trying to achieve
    You are mixing 'range' referencing and 'table' referencing, if you are going to use 'tables' familiarise yourself with its proper referencing.
    Also when setting up blank tables ready to receive data only set with two rows (one header+first data row).
    Put in a mock-up before and after sheet to help visualise, in the present there seems far too much 'selecting'

  7. #7
    Registered User
    Join Date
    10-06-2021
    Location
    Blandon, Pennsylvania
    MS-Off Ver
    Office 365
    Posts
    14

    Re: Paste from one sheet to another sheet that gets autofiltered for position

    I understand completely. I have had some time away from excel and now I'm getting back into it trying things I've not done or fully learned yet. I will work on it.

    My goal for the sheet I uploaded:

    On Search ECO, type in an ECO number and click "Search" button. Then:

    -Copy ECO number cell into variable
    -switch to "ECO Database" sheet
    -Autofilter using the variable to find all part numbers in the ECO
    -Be able to select these cells that remain, COPY
    -switch to "Search ECO" sheet
    -Paste contents here

    I have achieved that goal. The reason I want to only copy is if someone closes the sheet out or erases anything in that screen, I don't want it to leave the database.


    The next goal:

    ECO information is displayed, x amount of parts in the list all with their own comments, machine program statuses, etc...

    -Change statuses of any of the parts in an ECO#
    -Click "Update" button
    -Select all cells in the Search ECO sheet
    -COPY data (This is as far as I'm getting)
    -Switch to ECO Database
    -Using the ECO number that is stored in the variable, autofilter to bring back the data that we had searched for earlier
    -We shouldn't be adding any rows, so the amount of cells in ECO should remain the same
    -Select first cell in this new range and PASTE.
    -Autofilter turns back off
    -Sends you back to ECO Search sheet.


    I feel the only part I'm missing is after auto filtering the database, I have found the data that I need to paste over, but I can't find a "PASTE" only command.



    Maybe I have made this more complicated than it needs to be, but I hope I've explained a little better this morning.
    Any feedback is appreciated and as always, thank you for reading!

  8. #8
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,411

    Re: Paste from one sheet to another sheet that gets autofiltered for position

    alternative approach - use a userform to add/edit/update/remove data.
    with this method there is no need for sheet manipulation (i.e. autofilter/copy/paste etc.,)
    at the outset all data is loaded to an array, this is loaded to the listbox, at this stage everything exists in memory, no need to read/write to sheet until final mods complete.
    there is a direct link between the listbox.listindex and the sheet row thus eliminating need for search routines.
    both the sheet and the form can be expanded to accommodate more columns of data.
    to add a new item first press 'Clear' then enter your data and press 'Add' the rest should be intuitive.
    Attached Files Attached Files

+ 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. [SOLVED] Cut a row and paste in the same position on another sheet
    By Farley945 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2021, 11:48 AM
  2. Hyperlinked cell not working in the autofiltered sheet
    By Prithvi10 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-05-2020, 11:07 PM
  3. Can you set .splitrow (correctly) on an autofiltered sheet?
    By Oppressed1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2017, 08:33 PM
  4. Position shapes text boxes per listing on sheet to another sheet
    By jprlimey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-09-2014, 05:40 PM
  5. Replies: 0
    Last Post: 04-13-2011, 05:30 PM
  6. VBA Code on AutoFiltered Sheet
    By ron2k_1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2010, 02:03 PM
  7. can I export just the autofiltered data into own sheet?
    By kst82276 in forum Excel General
    Replies: 1
    Last Post: 05-13-2005, 01:06 PM

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