Forum Discussion

Elise Lekane's avatar
Elise Lekane
Copper Contributor
Nov 15, 2017

Conditional Copy/paste

Hello Everybody,

I need some help to create a macro on Excel VBA.
I've got a table in which the column n°3 contain some informations coming from a list.
I want that if this column contain the word "Engineering" by exemple, this select the entire row and copy/paste it in an other sheet.

I've started with this to select the column. (and it works! :-) )

Sheets("Summary").Select
Range("IQ[Category]").Select

But I don't know how it could detect the value and select the good line.
Here is what I try : (doesn't work :-( )

If ("IQ[@Category]" = "Engineering") Then
ActiveCell.Select
Selection.Copy
Sheets("Engineering").Select
Range("IQEng").Select
ActiveSheet.Paste
End If

Please find a simplified document in attachment to illustrate my request.
Thank you for your help and support! :-)

No RepliesBe the first to reply

Resources