# Reference Rows/Columns based on a formula

1. ## Reference Rows/Columns based on a formula

Hello,

I need to work out a way to make certain formulae reference rows and columns based on a formula for a school assessment mark book.

When I copy a block of text (say 45 rows), I want most of the row references to increment by 45, as is the usual with Excel. However, I want some of the references to only increment by 1, as that data refers to a marksheet on a different page, where each student's marks are entered in on that student's row, which naturally increment by 1.

The scores for each question are entered horizontally from C11 to BL11 on a separate sheet, with the row function used to make it read the horizontal data vertically as \$A1 copies downwards to \$A2, \$A3 etc.

I want the next student's formula to contain "(Marksheet!\$C\$12:\$BL\$12,ROW(\$A1))", but since the vertical scoresheet is 45 rows tall, the row references will increment by 45 instead of 1, and I have to manually correct the first cell before copying downwards for every student.

I was hoping there was a way to reference a row within a cell reference using a formula, such as "=Marksheet!\$A(=1+[Cell])", where the specified [Cell] would contain some kind of ceiling function that divides by 45 to increment by 1 for each student.

Is this possible?

Many thanks!

2. ## Re: Reference Rows/Columns based on a formula

it's generally better to post files as people can illustrate using a working example however, as you say, the key is to create the correct integer to pass to the INDEX

=INDEX(Marksheet!\$C:\$BL,11+CEILING(ROW(A1)/45,1),1+MOD(ROW(A1)-1,45))

so as the above is applied / copied down, it will pull the 45 marks from C:BL for each row, incrementing from row 12 for the first 45 rows, then 13 for next 45 etc

3. ## Re: Reference Rows/Columns based on a formula

I can't post the file as it contains student information.

But thank you - this works as I intended.

4. ## Re: Reference Rows/Columns based on a formula

FYI: We never expect you to share sensitive data, but usually a desensitised, cut-down sample workbook is helpful.

Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

There are currently 1 users browsing this thread. (0 members and 1 guests)