#### Amy from Charlotte

##### New Member

- Joined
- Mar 10, 2003

- Messages
- 4

Here is the formula:

=(IF($AF$74=1,B78,"")&IF($AF$74=2,SUM(B78:C78),"")&IF($AF$74=3,SUM(B78:D78),"")&IF($AF$74=4,SUM(B78:E78),"")&IF($AF$74=5,SUM(B78:F78),"")&IF($AF$74=6,SUM(B78:G78),"")&IF($AF$74=7,SUM(B78:H78),"")&IF($AF$74=8,SUM(B78:I78),"")&IF($AF$74=9,SUM(B78:J78),"")&IF($AF$74=10,SUM(B78:K78,"")))

So the idea is that if cell equals 1 then return a value, if cell equals 2 then sum 2 values and return, if cell equals 3 then sum 3 values and return. When I enter the formula above I get a #VALUE error. What am I doing wrong?

Thanks!!!