ColdGeorge
Active Member
- Joined
- Aug 21, 2012
- Messages
- 412
- Office Version
- 2016
- Platform
- Windows
Hello all
What I’m trying to do is copy names from list in one sheet, on to another sheet where the word LECTOR is found, the thing is when I run code, last name of list is shown in all cells, I need first name of list in first cell, second name of list in second cell, and so on, any help would be appreciated.
ColdGeorge
What I’m trying to do is copy names from list in one sheet, on to another sheet where the word LECTOR is found, the thing is when I run code, last name of list is shown in all cells, I need first name of list in first cell, second name of list in second cell, and so on, any help would be appreciated.
ColdGeorge
Code:
Dim c As Range
Dim d As Range
For Each c In Sheets("Hoja1").Range("A2:A6")
If c.Value <> "" Then
c.Copy
Sheets("Hoja2").Select
End If
Next
For Each d In Sheets("Hoja2").Range("A5:A13")
If d.Value = "LECTOR" Then
d.Offset(0, 1).PasteSpecial xlPasteValues
End If
Next
Application.CutCopyMode = False
Last edited: