copy and paste after filterinr rows

smiler44

Registered User.
Local time
Today, 10:35
Joined
Jul 15, 2008
Messages
678
copy and paste after filtering rows

I can not believe I cant do this and am sure I have asked before which makes it worse.

I have filtered the rows in my spread sheet. In the visible cells in column M after row 1 I have a vlookup formula which returns a value. I want to copy from the next visible row in column M after row 1 which is the header and paste not the formula but the value into the same row in column K.
Not each cell in column M will have a value as the vlookup may not have found a match.

How do I do this?

Thank you

Smiler44
 
Last edited:
thanks Rx. can you go one step further for me please?
say I want to copy the visible cells from m? to m100. ? as I don't know the first visible cell after row 1, how do I go about that and then how do I work out what row in k to start pasting? may be the answer to the second part will be clear if I knew the answer to the first part.

smiler44
 
this seems to have solved it

Code:
 [FONT=Calibri][SIZE=3]Columns("K:K").Select[/SIZE][/FONT]
 [FONT=Calibri][SIZE=3]    Selection.Copy[/SIZE][/FONT]
 [FONT=Calibri][SIZE=3]    Range("K1").Select[/SIZE][/FONT]
 [FONT=Calibri][SIZE=3]    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _[/SIZE][/FONT]
 [FONT=Calibri][SIZE=3]        :=False, Transpose:=False[/SIZE][/FONT]

smiler44
 

Users who are viewing this thread

Back
Top Bottom