Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Variable column reference in formula
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! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Variable column reference in formula
Try this:
=SUM(INDIRECT("H12:"&A4&"12")) Hope this helps. Pete On Jan 16, 12:22*am, excel help acct wrote: 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! |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Variable column reference in formula
Indirect should work fine:
=sum(indirect("H12:" & A2 & "12")) where you enter your letter in A2 cheers Carlo On Jan 16, 9:22*am, excel help acct wrote: 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! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
XL how to change a cell reference in a formula to variable value? | Excel Worksheet Functions | |||
variable text value within string formula required to sum column | Excel Worksheet Functions | |||
how do I use variable column and rows using other cell reference . | Excel Worksheet Functions | |||
reference cell value from fixed column with variable row | Excel Discussion (Misc queries) | |||
how to create a variable column in cell reference | Excel Worksheet Functions |