Dynamic named range in sumproduct formula

dkuyper

New Member
Joined
Jul 29, 2005
Messages
47
Hi All,

I am putting together a workbook that is retrieving data from a source system using excel4apps into one tab. On a second tab I am using a sumproduct formula to reference some of the retrieved data (I am using sumproduct as I am summing on column and row but, would be happy to change if there is a better way). I'm current using cell references in the sumproduct formula but, the retrieved data can vary in the number of columns and rows each time it is refreshed. Is there anything I can do so that the user doesn't have to change the cell references in the sumproduct formula each time the data is refreshed?

Hope this makes sense.

Any help would be greatly appreciated.

Thanks,

Dean
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
You can use named ranges in SUMPRODUCT formula.
If there is logic behind determining how to identify the range, you can use VBA code to build those named ranges.
 
Upvote 0
Hi Joe,
Thanks for the response. The problem I have is that the range changes each time I refresh the data. The no. of columns is consistent but the number of rows changes each time.
 
Upvote 0
The problem I have is that the range changes each time I refresh the data. The no. of columns is consistent but the number of rows changes each time.
That is what I meant when I asked if there is logic involved. We may be able to have VBA re-size the change, on-the-fly, if we know how this works.
We would need to know the following things:
- In your data, can you tell us a column letter that will ALWAYS have data? We can use this to determine the end of our data.
- Can you post the exact Sumproduct formula, for an example, so we can see which ranges (columns) are needed?
- When exactly would you like this code to run? Would you run it manually, or would you like Excel to try to do it automatically?
 
Upvote 0

Forum statistics

Threads
1,214,943
Messages
6,122,380
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top