# Need an if statement that looks at the next column after seeing an x in current column

I have a file with columns A through AQ. Each column has 51 rows.  I am trying to transfer all of the information in across columns A through AQ, down column A.

I put an X in the 51st row of each column, but I can't figure out how to make a formula that reads the X and then goes to the top of the next column.

Thanks!
###### Who is Participating?

Commented:
Try this formula in A52 filled down -

=INDEX(B\$1:AQ\$51,MOD(ROWS(A\$52:A52)-1,51)+1,INT((ROWS(A\$52:A52)-1)/51)+1)

You will get all the data from the other columns down to row 51

if you don't want the "x"s in row 51 then start at A51 and use this version:

=INDEX(B\$1:AQ\$50,MOD(ROWS(A\$51:A51)-1,50)+1,INT((ROWS(A\$51:A51)-1)/50)+1)

regards, barry
0

Author Commented:
Awesome, thanks!

One more question about adding a header in column B next to the data we just put in column A, will post shortly.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.