Understanding how a formula works

bobgrand

Active Member
Joined
Apr 14, 2008
Messages
250
Office Version
  1. 365
Platform
  1. Windows
Hello all,

I am confused with how the formula below works. What part of this formula makes the date know it's 2019?

The result I am getting in B1 is Fri, 01/04/19

:confused::confused::confused::confused:

Cell E3 - 1ST FRI EVERY JAN
Cell F3 - =IF(E3="","",(LEFT(E3)*7&RIGHT(E3,3)&$C$2)+1-WEEKDAY((LEFT(E3)*7&RIGHT(E3,3)&$C$2)-MATCH(MID(E3,5,2),{"mo","tu","we","th","fr","sa","su"},0)))

Any help would be greatly appreciated

Thanks
Bob
 
Last edited:

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Re: Help with understanding how a formula works

By whatever is in C2. If C2 is empty excel will assume its the current year same as if you type 1Jan in a cell the year will be current year.
 
Upvote 0
Re: Help with understanding how a formula works

Steve,

Did not know that. Thank you so much.

:)
 
Upvote 0
Re: Help with understanding how a formula works

An alternative that you can consider


Excel 2010
EF
31ST FRI EVERY JANFri Jan 4, 2019
41-Jan-19Fri Jan 4, 2019
51JanFri Jan 4, 2019
6
7N.B. default date format isdd/mm/yy
8
5b
Cell Formulas
RangeFormula
F3=IF(E3="","",(LEFT(E3)*7&RIGHT(E3,3)&$C$2)+1-WEEKDAY((LEFT(E3)*7&RIGHT(E3,3)&$C$2)-MATCH(MID(E3,5,2),{"mo","tu","we","th","fr","sa","su"},0)))
F4=WORKDAY.INTL(E4-1,1,"1111011")
F5=WORKDAY.INTL(E5-1,1,"1111011")
 
Upvote 0

Forum statistics

Threads
1,216,746
Messages
6,132,475
Members
449,729
Latest member
davelevnt

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