How to get drop-down selection to change range reference in a sumifs formula?

excelnoobnoob

New Member
Joined
Jun 27, 2017
Messages
29
Office Version
  1. 365
Platform
  1. Windows
Hi all,
I'm having trouble working this out...

I'm using this formula:
VBA Code:
=SUMIFS('HighLights Log'!Q:Q,'HighLights Log'!$F:$F,"BULLISH",'HighLights Log'!$C:$C,TODAY())
At the moment I guess you would call sum_range 'static'. I would like the sum_range to be variable based on the value in a cell.

So if cell F3=1, sum_range is M:M, if cell F3=2, sum_range is N:N, if cell F3=5, sum_range=O:O
Could anybody point me in the right direction to solve this pelase?

Thanks!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

I would try to avoid whole column references. Does this simple demonstration do the sort of thing that you want?

22 05 21.xlsm
FGHIJKLMNOPQRSTU
17347a
29373b
32217567a
46926b
58492a
65566b
75917a
82555b
SUMIFS
Cell Formulas
RangeFormula
G3G3=SUMIFS(INDEX(M1:P8,0,F3),U1:U8,"a")
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

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