Problem Multiplying 1D Array by 2D array by references of Named Range

brandondeal

New Member
Joined
Jan 19, 2022
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello,

I am trying to solve a problem where I multiply a 1D array of User inputs (Place a 1 in a cell if you want that row of data to be included in a calculation) by a 2D array of calculated data. I'm trying to use Named Ranges throughout the doc and have pasted their sections below. In the first screenshot is where I'm having trouble with my calculation. I assumed that if I used SUMPRODUCT of the named range in the second image below of 1's and blanks that I could use an indexed column from the 2D array shown in the 3rd image.

1st image - issue with calculation

Book1
BCDEFGH
3Operating_Expense012345
4OM_Base_Fee#VALUE!
5Contigency
6Noncovered_Maintenance
7Security_Software_Maintenance
Sheet1
Cell Formulas
RangeFormula
C4C4=SUMPRODUCT($B4,Compiled_Cost_Schedule*(Compiled_Operating_Years=C$3))
Named Ranges
NameRefers ToCells
Compiled_Cost_Schedule=Sheet1!$O$4:$T$11C4
Compiled_Operating_Years=Sheet1!$O$3:$T$3C4


2nd image - 1D array of Named ranges with 1's and blanks

Book1
JKLM
3OM Base FeeContigencyNoncovered MaintenanceSecurity Software Maintenance
41
51
61
71
81
91
101
111
Sheet1


3rd image - 2D array of calculations

Book1
OPQRST
3012345
4$ 7,000.00$ -$ -$ -$ -$ -
5$ 7,000.00$ -$ -$ -$ -$ -
6$ -$ -$ -$ -$ -$ -
7$ -$ -$ -$ -$ -$ -
8$ 500.00$ -$ -$ -$ -$ 541.22
9$ 20,000.00$ -$ -$ -$ -$ 21,648.64
10$ -$ -$ -$ -$ -$ -
11$ 15,000.00$ -$ -$ -$ -$ -
Sheet1


Named Ranges
Compiled_Cost_Schedule=Sheet1!$O$4:$T$11
Compiled_Operating_Years=Sheet1!$O$3:$T$3
Contigency=Sheet1!$K$4:$K$11
Noncovered_Maintenance=Sheet1!$L$4:$L$11
OM_Base_Fee=Sheet1!$J$4:$J$11
Security_Software_Maintenance=Sheet1!$M$4:$M$11
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMPRODUCT(INDIRECT($B4)*(Compiled_Operating_Years=C$3),Compiled_Cost_Schedule)
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUMPRODUCT(INDIRECT($B4)*(Compiled_Operating_Years=C$3),Compiled_Cost_Schedule)
Y'all make this look too easy on your end. Thank you! Could you help me understand why we would multiply the "Compiled Operating Years = C$3" function by the 1D array, and not the 2D array?
 
Upvote 0
Y'all make this look too easy on your end. Thank you! Could you help me understand why we would multiply the "Compiled Operating Years = C$3" function by the 1D array, and not the 2D array?
The reason I ask is that I'll be adding additional "triggers" and would be good to understand functionally why we multiply these operators by the respective array (i.e. IF("Name of Inverter"=This,1,0) type of calculation trigger)
 
Upvote 0
You need to multiply the 2 arrays together to find out which rows/columns should be used.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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