Hey all,
I am trying to getting the variable myMail to take the value in column F if the column H value of the same row is "x". For some reason I get an error. I hope it will be clearer by taking a look at the attachment or the code.
Thanks a lot in advance!
For some reason I can't find the option of inserting code in the special font (it has been some time since I posted here). Sorry about this:
Sub Mail_Workbook_1()
Dim myCell As Range
Dim myMail As String
For Each myCell In Range("h5:h" & Range("H" & Rows.Count).End(xlUp).Row)
If myCell = "x" Then
myMail = Range(myCell).Offset(0, -2).Value
MsgBox myMall
End If
Next
End Sub
Bookmarks