Can I store a value from a table search in a variable?

I am not a programmer that I ask your help and put a lot of questions and give all information because I was thinking will be easier and you will need this info.

Thank you for your answer and I will learn and try to understand I was thinking will be easy this problem which I got and again thank you @kazurayam and @grylion54 for helping me and again I know I should not do that buy sorry for your time I know is learning process but I think I give you a lot of headaches. Thank you guys I will try next time when I will post something to be clear and understandable what is the problem and where is the problem.