-1
Hello Good evening/day/afternoon, I have a question regarding writing an email using a macro.
Doubt this macro Test_logico() is done to read a column X and if different from "NO" it copies and pastes the values of column Y and Z of the same row...
EX: If the value of cell "A1" is different from no (equal to yes ) it takes in the same row the value of cell C1 and F1.
... I would like to paste this loop (since the check is done in more than one cell of the "X" column always with different sizes) within another macro that creates an Outlook email (in case this copy and paste would be within the body of the email. Body)
Sub Teste_logico()
Dim line As Integer
For line = 2 To Cells(Rows.Count, 11). End(xlUp). Row
If Cells(linha, 11) <> "NÃO" Then
Cells(linha, 5).Copy
Sheets("Planilha1").Select
End If
If Cells(linha, 11) <> "NÃO" Then
Cells(linha, 2).Copy
End If
Next line
End Sub
In case you need the email macro just ask
– João Vitor Vaz
And also if you think of better code for the problem I’m open to suggestions
– João Vitor Vaz