using sum & sumifs with a named range

jynxy

New Member
Joined
Feb 13, 2022
Messages
32
Office Version
  1. 2019
Platform
  1. Windows
Hi,

i have this formula which works fine

Excel Formula:
=200-(SUM(SUMIFS(B6:B405,E6:E405,{"h","ld","u","f"})))

what i need is {"h","ld","u","f"} to be a named range, so that values can be added in on a later date if needed. from what i can is this is not possible is that correct?

Thanks
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Do you mean you want to put "h","ld","u","f" into separate cells & use that range in the formula?
 
Upvote 0
In that case you do that, like
Excel Formula:
=200-(SUM(SUMIFS(B6:B405,E6:E405,MyRange)))
just change MyRange to the name of your range
 
Upvote 0
Thanks, i have tried this and weirdly none of the options change the result except the second, i have double checked the named range and it refers to =SETTINGS!$B$2:$B$20 so it should pick them all up?
 
Upvote 0
In that case can you post a sample of the data that shows the problem, along with the values in the named range.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
ahh i cant install that from this machine, are you ok to use this link to a sample of the file ?

Sample.xlsm
 
Upvote 0
Sorry forgot to add, goto Jan then the columns for 01/01/2022 you will see 4 under E and Holiday set, if you change Holiday to Say Lieu this changes B3 back to 200 instead of 196
 
Upvote 0
Ok, you will probably need to array enter the formula using Ctrl Shift Enter, or use
Excel Formula:
=200-(SUMPRODUCT(SUMIFS(B6:B405,E6:E405,L_LEAVE)))
 
Upvote 0
Solution

Forum statistics

Threads
1,215,217
Messages
6,123,670
Members
449,115
Latest member
punka6

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