Diving_Dan
Board Regular
- Joined
- Oct 20, 2019
- Messages
- 161
Hi all,
I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need to replicate this for the 19 rows beneath this. Do I need to Keep writing the same code for each row or can I write a code to cover all the rows.
Thanks
I'm very new to VBA and have written this simple code to copy certain cells if a certain cell within that row contains any data. I need to replicate this for the 19 rows beneath this. Do I need to Keep writing the same code for each row or can I write a code to cover all the rows.
Thanks
Code:
Sub Copy_To_Email()
If Not Range("B5") = "" Then
Range("E5:H5,N5").Copy
End If
End Sub