Week number formula covering more than one year

TomParkD

New Member
Joined
Jun 14, 2011
Messages
6
I have an array formula that collates costs for eg travel expenses against a week number eg 28/8/14= week 25. Everything works fine until I have the same week number in the following year. The array now adds everything for week 25 for 2014 and 2015 and puts the grand total into week 25 in both 2014 and 2015. How do I get the separate totals for week 25 for 2014 and 2015?
 
Hi,
Have you tried adding IF(year=2014) somewhere in your formula?

Having full formula would help as well :)

Regards
 
Upvote 0
Hi,
Have you tried adding IF(year=2014) somewhere in your formula?

Having full formula would help as well :)

Regards

The formula is

sum(((NominalCode=$c100)+(week number=f$98))=2)*NetAmount)

i will try what you suggest

Thanks!
 
Upvote 0
Legend:
formulas
values


I believe this should be ok:

sum(((NominalCode=$c100)+(if(year_number=''2014'';week_number=f$98)))=2)*NetAmount)

or having ''2014'' in some different cell so it can be changed quickly:

=sum(((NominalCode=$c100)+(if(year_number=required_year;week_number=f$98)))=2)*NetAmount)

where
required_year is located in a cell like A1.


or for current year

=sum(((NominalCode=$c100)+(if(year_number=year(today());week_number=f$98)))=2)*NetAmount)


Hope this helps
 
Upvote 0

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