I was summing a column that was all Canadian funds but the client has since introduced other currencies into the rows. So now to sum a column if it is canadian funds then I just sum the funds and if it is other than CDN funds then I need to multiply by the currency then sum it all as Canadian. Here is my code below. Can anyone tell me why the SumProduct function will not work properly in my code. If I do the following command in Excel columns then everything works fine but now I need to take this code
and incorporate it in my Excel Macro code where I look thru worksheets to sum each individual column that has numerical amounts. Am doing this to update the summary total worksheet. Here is my Excel Macro code below. I get a compile error on my new SummaryTotal field stating that "Sub or Function not defined" and it highlights the SumProduct function within my NEW SummaryTotal field calculation.
The old SummaryTotal calculation worked just fine but when foreign currencies were introduced into the rows I had to modify the calculation. I did not want to loop thru the columns manually using a loop because each worksheet has maybe 30 columns that need to be individually summed and there are maybe 20 worksheets. My logic loops thru each worksheet and then summarizes the dollar totals for each individual column to a specific cell within the YTD summary total worksheet.
How do I this modified SummaryTotal calculation to do what I need to do? Here is my macro coding below.
Bookmarks