+ Reply to Thread
Results 1 to 5 of 5

How to copy a value to an auto filtered column and only paste to the filtered rows in VBA

  1. #1
    Registered User
    Join Date
    07-13-2010
    Location
    texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Angry How to copy a value to an auto filtered column and only paste to the filtered rows in VBA

    Hello Everyone,
    I am very new to VBA. I have a requirement from a client that I have to complete by Monday. I have a spreadsheet that could possibly have over 20k rows in it and approximately 20 or so columns. They want to be able to use the auto filter for any of the 20 columns to get the rows that they want to show on the spreadsheet. Once that is done they want to apply a factor or apply a date that the user will enter into another range on the sheet to ONLY the visible rows and into one specific color coded column. So I can't do a regular copy paste because it will paste the factor or date entry over all 20k of the rows even if they are not showing in the filter. If there is anyone who could assist me I would be grateful. I have been working on this for a while and It is due Monday.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to copy a value to an auto filtered column and only paste to the filtered rows in

    not sure if i understand you, but couldnt you just put your data in 1 column, apply the factor in another column, and then use that 1 for the filter?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    07-13-2010
    Location
    texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to copy a value to an auto filtered column and only paste to the filtered rows in

    The data is being submitted into a database and based upon the region selected the number of rows will change. The filter has to occur first because there are upwards of 20,000 members in the dimension that is dumped into the rows. So the users are to then filter based on one or multiple columns as we have approximately 20 columns of data. They filter the data as they don't want to scroll through 20k lines of data. Once they get the selections they want then they have to type in a date for the 2nd Apply box and it should only copy that date to the visible rows that are displayed with the auto filter.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: How to copy a value to an auto filtered column and only paste to the filtered rows in

    ok, but whats the problem with having a formula there that uses the date in your column J. the rows that wont be shown will still have the dates, but...they will be hidden, so why does it matter if they hav ethe dates in them?

  5. #5
    Registered User
    Join Date
    07-13-2010
    Location
    texas
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: How to copy a value to an auto filtered column and only paste to the filtered rows in

    Because the data in that column is being submitted back into the database and it will be used in other calculations. So it will change financials on things that are not supposed to be changed.

+ 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