I have 4 nested loops that used based on the case given. The code is quite similar but there is a little difference in the comparison. Please check this code:
If Case