hello i will like to know if i can print values from diferent sheets and also print all the rows that contain an especific value if so what do i need to do?

Open "C:\temp.txt" For Output As #1
Print #1, Range("B3").Value, Range("C4").Value
Print #1, Range("Q981").Value, "hello world!" ' or whatever else
Close #1

Thanks in advance