Trying to see if I can even create a Macro! Please help!
Closed
almacgtz
Posts
2
Registration date
Friday 16 January 2015
Status
Member
Last seen
21 January 2015
-
16 Jan 2015 à 15:11
RayH - 21 Jan 2015 à 15:57
RayH - 21 Jan 2015 à 15:57
Related:
- Trying to see if I can even create a Macro! Please help!
- To create a network bridge you must ✓ - Network Forum
- How to create @ in laptop - Guide
- How to create a firefox sync - Guide
- Can you create an instagram story from computer - Guide
- I need help bridge connection - Linksys Forum
1 response
Give this a go.
Sub copystudents()
Let LastRowH = Range("H" & Rows.Count).End(xlUp).Row
Let LastRowA = Range("A" & Rows.Count).End(xlUp).Row
For Each c In Range("H3:H" & LastRowH)
On Error GoTo notfound
x = Rows(Application.Match(c.Value, Range("A1:A" & LastRowA), 0)).Row
Range(c.Address & ":L" & c.Row).Copy Destination:=Range("A" & x & ":E" & x)
notfound:
Next
End Sub

21 Jan 2015 à 11:55
The code worked perfectly fine; however, if a student number is already on the left side is there any way to highlight the information on the right side without replacing the information on the left side.
Best regards,
Alma Gtz
21 Jan 2015 à 15:57
I am highlighting in red where the value on the right is not found.
For any others the colors stay as they are.