It's difficult to see from your post how the data is arranged. But you might want to experiment using =TRANSPOSE().