Copying only few of the columns after filtering

  • Im here again with another problem and ill probably post again later. Im not putting everthing I want in a single topic because I want to learn how do it instead of getting something done by someone else.


    My Problem:


    I want to copy just some columns (C, S, U) of my sheet after I filtered it.


    One of the problems is that I want to do it for multiple filter criterias so I just cant say, for exemple A1:A500, because I dont know how many entrys one filter has


    The second problem is copying the columns and pasting it in another sheet


    Here is my code. it will filter by the criterias i want, but i didnt put the loop for all the sheets yet, but its not the problem. I'm stuck at the part that copy the columns



    I did find some answers for this problem in this forum but they were too complex for me to undestand and modify for my use or it used this syntax Range("A1:A600") but when I run it it gives me error 438



    ---------------------------------------


    Update:


    I found a way to do it here is it if anyone is interested


    Code
    lRow = Font.Worksheets(1).Range("C" & Font.Worksheets(1).Rows.Count).End(xlUp).Row
    Font.Worksheets(1).Range("C1:C" & lRow).Copy Dest.Worksheets(Z).Range("A1")
    Font.Worksheets(1).Range("K1:K" & lRow).Copy Dest.Worksheets(Z).Range("B1")
    Font.Worksheets(1).Range("U1:U" & lRow).Copy Dest.Worksheets(Z).Range("C1")
    Font.Worksheets(1).Range("S1:S" & lRow).Copy Dest.Worksheets(Z).Range("D1")

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!