Question: For Excel VBA code and please comment your email so that I can send you excel data file. Thanks. 4). Using the worksheet Data attached
4). Using the worksheet Data attached file, write a sub that will do the folowing: an anchor cell b). locate the cell where the word Bins is located c). declare a dynamic array (name it Bins) as a single and a dynamic array (name it cnt) as an integer d). count the number of bins using range properties (ie., count, etc) e). re-dimension the array Bins to have the number of bins specified in the worksheet and determine in d) f). re-dimension the array Cnt to have the number of bins plus one g). write a sub that will count the number of times the "amount purchased is below the first value in the Bins array and place in the first element of the array Cnt, the number of times the amount purchased" is greater than the first value and less than or equal to the second value in the Bins array and place it in the second element of array Cnt, and so on. The last element of the array Cnt will include the number of times the "amount purchased exceeds the last value in the Bins array h). write next to the column for the Bins, the numbers collected in the Cnt array, Note that the Cnt array has one more element than the Bins array. Your code should run for a different number of Bins and a different data set with A3 as anchor cell. For the example given in the worksheet, the column for Counts will look as follows: Counts Bins 75 100 294 500 63 700 1000 53
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
