codedreamer
New Member
Hello,
I have a macro where if one condition is true then two things should happen. I tried to used "and", but it gives me an error message. This is what I have:
[pre]
[/pre]
Thank you for your help,
Codedreamer
I have a macro where if one condition is true then two things should happen. I tried to used "and", but it gives me an error message. This is what I have:
[pre]
Code:
If ThisWorkbook.Sheets(i).Range("A1").Value = 5 Then
ThisWorkbook.Sheets(i).Range("B2").Value = ThisWorkbook.Sheets(i).Range("A3").Value AND
' ThisWorkbook.Sheets(i).Range("D4").Value = ThisWorkbook.Sheets(i).Range("C3").Value
Thank you for your help,
Codedreamer