Sumif

Hoosier03

Board Regular
Joined
Apr 29, 2011
Messages
121
I am using Excel 2007. This is the equation that I have.

=SUMIF('Act Query'!$B22:$B261,C5,'Act Query'!DJ22:DJ436)

The equation works, but I have a problem. 'Act Query'!DJ22:DJ436 references a worksheet of data that is pulled from an SAP file. The problem is that this file is counting weeks and every few years there are 53 fiscal weeks in the year. Is there a way I can write this equation that it references the week number instead of a specific column?

Thanks,

Rodney
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
=WEEKNUM(TODAY())

This will return the week number for today's date, but the week number is based on a calendar year. What is your fiscal calendar? Is it 12 months, just starting in a different month than January or is it a 4-4-5? 13 periods, etc?
 
Upvote 0
The following formula will calculate the weeknumber for the date in cell A1 based on a starting date of 10/1. I assumed your weeks run Sunday - Saturday. Additionally, you will have to change the 2011 in the formula everytime the year changes.


=ROUNDUP((A1-(IF(WEEKDAY(DATE(2011,10,1),1)=1,DATE(2011,10,1),DATE(2011,10,1)-(WEEKDAY(DATE(2011,10,1),1)-1)))+1)/7,0).

When tested it shows that the first week only has 1 day since 10/1/2011 starts on a Saturday.
 
Upvote 0

Forum statistics

Threads
1,224,537
Messages
6,179,405
Members
452,911
Latest member
a_barila

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