Problems with displaying different sensor values on lcd with ir sensor.

PaulS:
Of course they aren't. The ONLY time you change what is displayed is when you press an IR button. I told you, way back at the beginning that you need to separate the "what to display" code from the "display that" code. You have NOT.

You are right, but I don't know how to do that and I also didn't find it anywhere. because of this I have learned many things about arduino and the sensors, but I still didn't find how to separate those.I have tried to put it all into the IR sensor If function but it didnt work since i got an error that said they are interrupting each other, then I did what I posted but it still doesnt work. I also did many variations of this with some little changes but nothing worked.