# Dynamic Charts

#### Spikenaylor

##### Board Regular
Hi

trying to setup a dynamic chart

Got it working correctly with empty cells, enter data in the cells and the chart grows or shrinks correctly.

My problem is

Cell B5 is waiting for user data

Cell C5 has a formula =IF(B5<>"",C92,NA()) or =IF(B5<>"",C92,"") so it populates with data from cell C92 when correct data entered into B5

Because the cell has a formula in it the chart is now static and will not shrink or grow.

How can I format cell C5 so it appears blank when no data is entered into B5 so my chart can be dynamic.
Many thanks

Mike

### Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).

#### tmmellor1981

##### Board Regular
Hi

Normally i'm the one asking for help but think I know how to fix that issue, just add another IF at the beginning to say if B5 blank make C5 Blank

=IF(B5="","",IF(B5<>"",C92,NA()) or =IF(B5<>"",C92,""))

regards
Tim

#### Spikenaylor

##### Board Regular
I worked another solution out by using COUNTIF function to count how many cells have non data in in my defined name range for the data

I leave the C5 cell with the formula =IF(B5<>"",C92,"") in.

My range is B5 to B34 that the users enters data, all the formulas are in C5 to C34

In my defined name range this is the formula =OFFSET('Viability Sheet'!\$C\$5,0,0,COUNTA('Viability Sheet'!\$C\$5:\$C\$34)-COUNTIF('Viability Sheet'!\$C\$5:\$C\$34,"*"),1)

Works great, my chart shrinks and grows just perfectly.

Replies
9
Views
2K
Replies
2
Views
597
Replies
5
Views
209
Replies
11
Views
365
Replies
3
Views
808

1,190,831
Messages
5,983,129
Members
439,825
Latest member
glen3265

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back