Using "If" in a loop with more than one variable

Thanks, I got it working now!