Werner,
I found something about assembly a matrix to determine all combinations of four variables in the link
but I can not understand the procedure because the woksheet is very complicated. Please, can you help me to write a programing to assembly the matrix as you suggested in option 1 or create a routine as you suggested in option 2?
Thank you very much for your time and effort.