Variable column reference in formula

E

excel help acct

I am trying to use a variable column reference in a formula. Here is an
example:

=SUM(H12:R12) where R can vary depending on the value in cell A4 on the same
spreadsheet

I have tried using INDIRECT and OFFSET but I must have the syntax wrong as
excel keeps flagging the formula with errors. Can someone please translate
the formula above to one with a variable in place of the "R" reference again
contingient on the value of cell A4.

THANK YOU!
 
C

carlo

Indirect should work fine:

=sum(indirect("H12:" & A2 & "12"))

where you enter your letter in A2

cheers
Carlo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top