Dear AlanJ10,
Thank you so much for your help. The added code at the end is the original one which only works for values less\more than 1. But I need the general rule which you have made and only the integer values should be placed in the table. Therefore, no fraction should be appeared...