(Please help if you can) Line Graph to Stop when data stops

belly0fdesire

New Member
Joined
Sep 6, 2005
Messages
39
I searched and found a trick to make the data not be graphed by making it show #N/A instead of 0, however, i want the graph to grow as the data grows... in other words, I have a sheet that goes all the way up to IV21 with the code shown below and I want those values graphed, the data may stop at AE21 or at BB21... I want the graph to stop when the data stops. Using what I show below and just selecting C21:IV21 as the data range for the graph eliminates the "troughs" from the zeros, but leaves me with a lot of empty space in the graph. It looks terrible. This is hard to describe, so I hope I'm getting it across okay. Any ideas on how I can graph only up to the point where the data stops?


Code:
=IF(C18=0,NA(),((C4*'Incentive Values'!$D$2)+(C5*'Incentive Values'!$D$3)+(C6*'Incentive Values'!$D$4)+(C7*'Incentive Values'!$D$5)+(C8*'Incentive Values'!$D$6)+(C9*'Incentive Values'!$D$7)+(C10*'Incentive Values'!$D$8)+(C11*'Incentive Values'!$D$9)+(C12*'Incentive Values'!$D$10)+(C13*'Incentive Values'!$D$11)+(C14*'Incentive Values'!$D$12)+(C15*'Incentive Values'!$D$13)+(C16*'Incentive Values'!$D$14)+(C17*'Incentive Values'!$D$15)))
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

belly0fdesire

New Member
Joined
Sep 6, 2005
Messages
39
hmmm... this is what i'm trying to avoid

 

Watch MrExcel Video

Forum statistics

Threads
1,118,079
Messages
5,570,082
Members
412,310
Latest member
mark884
Top