I have to create an email that consists of data from the first name, the last name, an ID number, and then add "@-----.com" The email will appear every 17th row in column B. the information it needs is also in column B. Then it needs to repeat. The email must be the first 2 characters from first name, skip the first character of last name and take the rest, and the last 4 digits of ID. Finally, it needs to add the, "@------.com" and display it on B 17. This is what I have so far:
Sub parse()
Dim x, n, y, z
n = 11 ' this sets the line to count from in B for first name
y = 9 'this sets the line to count from in B for lastname
z = 13 'this sets the line to count from in B for Id
For x = 17 To Range("A65536").End(xlUp).Row + 17 Step 17 'this loops the code every 17th line
Range("B" & x).Value = Left(Range("B" & x - n).Value, 2).Value & Range("B" & x - y).Value & Right(Range("B" & x - z).Value, 4).Value & "@live.hccc.edu"
Next x
End Sub
I keep getting Object Required and Error 424, object required. Any advice? :/ Thank you for any help.
Bookmarks