Sumif Range

carianne

New Member
Joined
Jul 24, 2006
Messages
4
I have a sumif formula that references a range that I want to remain static. I update the data daily and sometimes the range varies based on how many patients are in our beds. The max it will ever be is 314. I used the following formula:
{=SUM(IF('Census By Service'!$F$2:$F$314="NEU",'Census By Service'!$M$2:$M$314,0))}

However, everyday the formula readjusts the range based on the data I enter, so I have to update the formula range daily. I want it to always look through the range max, but even adding the $ sign before the range does not seem to accomplish this. Any suggestions?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi carianne

You can use INDIRECT.

=SUM(IF(INDIRECT("'Census By Service'!$F$2:$F$314")="NEU",INDIRECT("'Census By Service'!$M$2:$M$314"),0))

This formula will always look at the same ranges even if you add or delete lines.

Hope this helps
PGC
 

sailepaty

Active Member
Joined
Nov 1, 2005
Messages
279
One more option,

=SUMIF('Census By Service'!$F$2:INDEX('Census By Service'!$F:$F,314),"NEU",'Census By Service'!$M$2:INDEX('Census By Service'!$M:$M,314))

Regards
 

Forum statistics

Threads
1,136,305
Messages
5,674,984
Members
419,541
Latest member
freddyboots

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
Top