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

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,223,927
Messages
6,175,444
Members
452,642
Latest member
acarrigan

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