# SUMIF or SUMIFS with Variable Column

#### neilfleming

##### New Member
I'm trying to SUMIF project staffing allocations over a fixed range of rows but with a variable column depending on the date in that column. I.e., I have a couple of years' worth of staffing data in columns, and a bunch of projects and employees in those rows.

I want to sumif for "Project A" the allocations in column "BQ".

It's a simple SUMIF statement:
=SUMIF('Project Staffing'!\$A\$5:\$A\$678,\$B26,'Project Staffing'!BQ\$5:BQ\$678)

Here is the formula that returns precisely the result: 'Project Staffing'!BQ\$5:BQ\$678

Where \$L\$3 is any date, like Today(), which I then convert to the starting Monday of that particular week.

When I substitute 'Project Staffing'!BQ\$5:BQ\$678 with the formula above in the SUMIF formula, Excel says there is a problem with the formula and won't even let me leave the formula bar. I can substitute the 'Project Staffing'!BQ\$5:BQ\$678 actual text into that formula and it works fine.

So, the problem is less the specifics of my formula, and more of how do I use the result as an argument in my SUMIF formula.

Suggestions?

Thanks...Neil

### Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

#### neilfleming

##### New Member
Darn! I looked at some of my other work and the answer is INDIRECT(). Geeze!

Replies
0
Views
135
Replies
17
Views
696
Replies
3
Views
117
Replies
3
Views
37
Replies
14
Views
285

1,148,291
Messages
5,745,892
Members
423,983
Latest member
blackworx

### 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.

### Which adblocker are you using?

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

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