Alternative reference formula for sumproduct formula help
I am looking for a way to use the sumproducts formula in excel, but have it change the array based on the line item that I a reporting on. The scenario is that I have a table that contains rows with different line items and the columns represent different monthly data. For example, my rows contain the average daily sales for apples on row2, oranges on row3, and so on for many different items. Row one represents the number of days that have passed in a given month. For example, cell A1 shows 31 days in January, cell B1 shows 28 days in February, and cell C1 shows only 10 days have passed in March, and the remaining cells in Row 1 show zero days have passed. On a separate tab, I am trying to utilize a sumproducts formula for each item that uses the days of the month as one array and whatever item that is referenced as the other array. I have a list of over 100 items in column A. I would like to utilize the sumproduct formula for each item and put this formula in column B. Currently, the only way I know to do this is to lock in the days of the month row as the first Array and go one by one and hardcode which row I want to each formula to reference. The items cannot be in the same order simultaneously, because the data is one row after another, but the reporting format skips many lines between data points with items grouped differently. Is there a reference formula that I can use that would look at the item for which I am reporting on and sumproducts the data that lines up with the referenced item? Any other suggestions?
|