Column "A" of my data has the frequency in each data bin and is plotted on the "Y" axis, column "B" has the data bins and is plotted on the "X" axis. Column "C" has the next parameter's frequency data and Column "D" has the next parameter's data bins. Here's the code I use:
ReDim binsArray(0 To Resolution)
stepValue = (MaxScale - MinScale) / Resolution
For j = 0 To Resolution
binsArray(j) = MinScale + stepValue * j
FinalChartBook.Worksheets("HistChartData") .Cells(j + 1, 2 * i) = binsArray(j)
Next j
Set dataRange =
.Range(.Cells(5, i), .Cells(NumRows, i))
Set resultsRange = FinalChartBook.Worksheets("HistChartData").
Range(FinalChartBook.Worksheets("HistChartData").Cells(1, (2 * i) - 1), FinalChartBook.Worksheets("HistChartData")
.Cells(Resolution + 1, (2 * i) - 1))
resultsRange = finalWB.Application.WorksheetFunction.Frequency(dataRange, binsArray)