Calculating Number of Days in Quarter and More

kiyo052

Board Regular
Joined
Oct 11, 2013
Messages
134
I need a formula for I1 and I2 based on the Quarter given in G1

What I figured out so far is that I need a MATCH formula and NETWORKDAYS

For I1 I was thinking a MATCH "Q"&G1 to a range of A1:D1

Since today is 1/20/17 then the example should be these results:
If G1=1 than I1= 15 and I2= 65
If G1=2 than I1=-51 and I2=65
If G1=3 than I1=-116 and I2= 65
If G4=4 than I1=-181 and I2=65

I know there are holidays and I can calculate that later.

Please let me know if this is at all possible.

Thank you!!!!

ABCDEFGHI
1Q1Q2Q3Q4Quarter1Days Lapsed
21/1/20174/1/20177/1/201710/1/2017Year2017Days in Quarter
33/31/20176/30/20179/29/201712/31/2017
4

<tbody>
</tbody>

 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
How's this?


Excel 2010
ABCDEFGHI
1Q1Q2Q3Q4Quarter1Days Lapsed15
21/1/20174/1/20177/1/201710/1/2017Year2017Days in Quarter65
33/31/20176/30/20179/29/201712/31/2017
Sheet2
Cell Formulas
RangeFormula
I1=NETWORKDAYS(INDEX(A2:D2,MATCH("Q"&G1,A1:D1,0)),TODAY())
I2=NETWORKDAYS(INDEX(A2:D2,MATCH("Q"&G1,A1:D1,0)),INDEX(A3:D3,MATCH("Q"&G1,A1:D1,0)))
 
Last edited:
Upvote 0
Is this what you need?

I1 =NETWORKDAYS(DATE($G$2,($G$1-1)*3+1,1),TODAY())
I2 =NETWORKDAYS(DATE($G$2,($G$1-1)*3+1,1),DATE($G$2,$G$1*3+1,0))
 
Upvote 0
Or

I1
=NETWORKDAYS(INDEX($A$2:$D$2,G1),TODAY())

I2
=NETWORKDAYS(INDEX(A2:D2,G1),INDEX(A3:G3,G1))

Hope this helps

M.
 
Upvote 0
This really helps! Thank you!

I thought I could manipulate your formulas to include holidays I include but I guess I'm not that skilled.

Is there a way to included holidays? The holiday section could increase depending on what the boss wants to included (i.e. black friday, xmas eve, new years eve, etc.)

ABCDEFGHI
1Q1Q2Q3Q4Quarter1Days Lapsed
21/1/20174/1/20177/1/201710/1/2017Year2017Days in Quarter
33/31/20176/30/20179/30/201712/31/2017
4
51/2/20177/4/20177/4/201711/23/2017
69/4/201711/24/2017
712/24/2017
812/25/2017
9

<tbody>
</tbody>
 
Upvote 0
I would put all of your holidays in one column off to the side somewhere. For example (using Marcelo's formulas):


Excel 2010
ABCDEFGHIJK
1Q1Q2Q3Q4Quarter1Days Lapsed14Holidays
21/1/20174/1/20177/1/201710/1/2017Year2017Days in Quarter641/2/2017
33/31/20176/30/20179/30/201712/31/20177/4/2017
49/4/2017
511/23/2017
611/24/2017
712/24/2017
812/25/2017
Sheet3
Cell Formulas
RangeFormula
I1=NETWORKDAYS(INDEX($A$2:$D$2,G1),TODAY(),K2:K8)
I2=NETWORKDAYS(INDEX(A2:D2,G1),INDEX(A3:D3,G1),K2:K8)
 
Last edited:
Upvote 0
To consider the holidays try

I1
=NETWORKDAYS(INDEX($A$2:$D$2,G1),TODAY(),INDEX(A5:D20,0,G1))

I2
=NETWORKDAYS(INDEX(A2:D2,G1),INDEX(A3:D3,G1),INDEX(A5:D20,0,G1))

The number 20 is arbitrary - adjust

M.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,094
Latest member
bsb1122

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