# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  >  How to Change a graph size with VBA

## dumbexcel55

I am trying to figure out how to change the amount of rows in my graph based on a singular numeric input.  For example if the input is 15 I would like 15 rows, but if you change it to 20 I would like 20 rows.  I know you have to do it in VBA but I spent hours on it and couldn't figure it out.  Can anyone please help?

----------

