(This is quite different in approach to the macro-oriented dynamic area of resizing, so I use a separate answer ...)
A dynamic histogram chart can be constructed by remembering that "named ranges" are actually called formulas, so their values can be dynamic, in some cases extremely.
Let's start with the assumption that we have an arbitrary set of values in column A, starting from row 1, and also that we have another cell containing the number of bins that we want in our histogram. In my book, this is E2. Therefore, we launch the name manager (on the "Formulas" tab) and create
num_bins =Sheet1!$E$2
, ( ), : , , ? *
:
data_count =COUNT(Sheet1!$A:$A)
data_vals =OFFSET(Sheet1!$A$1,0,0,data_count,1)
max_val =MAX(data_vals)
min_val =MIN(data_vals)
, , . ? :
bin_size =(max_val-min_val)/(num_bins)
: :
bin_array =min_val+ROW(OFFSET(Sheet1!$A$1,0,0,num_bins-1,1))*bin_size
bin_labels =min_val+ROW(OFFSET(Sheet1!$A$1,0,0,num_bins,1))*bin_size
data_vals =FREQUENCY(data_vals,bin_array)
: num_bins minus one -size bin_size. min_val, FREQUENCY() . , , , . bin_labels.
. () " " ( , ). , Series =Sheet1!freq_array. . , , "". "" " () " =Sheet1!bin_labels.
2000 =RAND()*5 5 ( , )

num_bins 10. ( RAND() , )
