Peter Adey
New Member
- Joined
- May 7, 2002
- Messages
- 6
Is it possible to use an array where the variable is a cell reference? This is what I have so far, which is using nested IF statements instead...
=IF(A2=1,D2,IF(A2=3,SUM(D2:F2),IF(A2=6,SUM(D2:I2),IF(A2=9,SUM(D2:L2),IF(A2=12,SUM(D2:O2),IF(A2=15,SUM(D2:R2),"X"))))))
Ideally I would like to refer to the number in A2 and sum that many cells, I have 60 columns of data!
Any ideas???
This message was edited by Peter Adey on 2002-05-08 05:20
=IF(A2=1,D2,IF(A2=3,SUM(D2:F2),IF(A2=6,SUM(D2:I2),IF(A2=9,SUM(D2:L2),IF(A2=12,SUM(D2:O2),IF(A2=15,SUM(D2:R2),"X"))))))
Ideally I would like to refer to the number in A2 and sum that many cells, I have 60 columns of data!
Any ideas???
This message was edited by Peter Adey on 2002-05-08 05:20