May I ask your help for a macro which allowed me to copy a range (column) 16350 times

On D5 to D369 I have a formula which do a random calculation.

On F4 to XEA4 I have a number from 1 to 16,350

I need a macro which copy the range D5 to D369 on range F5 to F369 (F4=1);G5 to G369 (F5=2) and so on till XEA5 which is the 16,350 columns...

I need the macro ended when it reach the number 16,350 or XEA4

thank you very much for your help

I hope I was clear as a beginner in VBA

thank you

CZ