I am looking to set up a formula that would add a certain number of consecutive cells in a table based on an input.
For example; cell A2 will have an entry. Based on a lookup of that entry, I would like cell B2 to be the sum of G2:?2.
Si, if cell A2 = 6, then B2 should be sum of G2:L2.
Lookup cell A2 in "table" below to get the appropriate sum in cell B2.
Table:
1 G2:G2
2 G2:H2
3 G2:I2
4 G2:J2
5 G2:K2
6 G2:L2
Thanks for your help,
DT
BTW, I prefer a formula instead of a macro.
For example; cell A2 will have an entry. Based on a lookup of that entry, I would like cell B2 to be the sum of G2:?2.
Si, if cell A2 = 6, then B2 should be sum of G2:L2.
Lookup cell A2 in "table" below to get the appropriate sum in cell B2.
Table:
1 G2:G2
2 G2:H2
3 G2:I2
4 G2:J2
5 G2:K2
6 G2:L2
Thanks for your help,
DT
BTW, I prefer a formula instead of a macro.