Split in two periods

What do you mean with "from A1 to An" and "from 1 to n"? Rows and columns?
Can you describe it better, or share a (snippet) of your dataset for a better understanding?
See: FAQ: How to do a minimal reproducible example ( reprex ) for beginners