What is this formula doing?

coppercarbide

New Member
Joined
Apr 7, 2011
Messages
6
Hi all,

I made a sheet a long time ago and need to modify it a bit. One of the cells calculates how many work days are within two days, I had some help doing this one, and I'm using this formula:

=IF(J6="",0,SUM(INT((WEEKDAY(J6-{2,3,4,5,6,7})+K6-J6)/7)))

I need to modify this formula in order to be able to dynamically set whether Saturday is a workday or not (currently it is in the above formula).

If someone could explain what exactly this formula is doing, I should hopefully be able to figure out how to dynamically select the workdays.

Thanks!
 
Wow.
It took me about 10 minutes of reading the explanation to figure out what was going on! That's extremely impressive.

I do like the IF with the array option, as it is a bit more elegant than what I ended up with. However, the one I wrote is already done, so I may keep that until I need to muck with it for some other reason.

Thanks so much, I'm going to definitely add this to my list of fantastic solutions for the future!
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,215,884
Messages
6,127,562
Members
449,385
Latest member
KMGLarson

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