SUMPRODUCT question - referencing cell

jcooooper

Board Regular
Joined
Mar 24, 2018
Messages
74
Office Version
  1. 365
Platform
  1. Windows
Hi all,

The below code, I am trying to change the "<1" to reference a cell that contains the value 1.

When I substitute the cell for the hard number, doesn't seem to work. Any ideas?

Thanks!

Code:
Range("E21").FormulaR1C1 = _
        "=SUMPRODUCT(SUMIFS(Data_notional_weight,Data_security_type,FI_security_types,Data_duration,[B]""<1""[/B]))"
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
What is the cell reference and does it have any absolution, the dollar signs?
 
Upvote 0
Cell reference will be one column to the left, so D21.

I was hoping to adapt the formula from Range("E21") to Range(E21:E50), but each would look at the column to the left, so trying to avoid absolute references if possible

Hope that makes sense
 
Upvote 0
Try like this:

Code:
Range("E21:E50").FormulaR1C1 = "=SUMPRODUCT(SUMIFS(Data_notional_weight,Data_security_type,FI_security_types,Data_duration,RC[-1]))"
 
Upvote 0
Try like this:

Code:
Range("E21:E50").FormulaR1C1 = "=SUMPRODUCT(SUMIFS(Data_notional_weight,Data_security_type,FI_security_types,Data_duration,RC[-1]))"

Ok that works, but I need the formula to be "< RC[-1]"

I've tried a few variations, one that returns TRUE, when I'm trying to get it to sum product
 
Upvote 0

Forum statistics

Threads
1,223,882
Messages
6,175,166
Members
452,615
Latest member
bogeys2birdies

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