Hi, I am wondering if anyone can help me simplify an excel formula. The formula works fine but it’s quite long. I can’t think of another way to write it. The formula is:
=IF((EOMONTH(I3,0)-MOD(WEEKDAY(EOMONTH(I3,0))+1,7)-4)<4=EOMONTH(I3,0),EOMONTH(I3,0)-MOD(WEEKDAY(EOMONTH(I3,0))+1,7)-4,EOMONTH(I3,0)-WEEKDAY(EOMONTH(I3,0)-2))
The formula is working out which Monday is the best to return (last or 2nd to last) depending on how close it is to the last Friday of the month
Hope this makes sense
=IF((EOMONTH(I3,0)-MOD(WEEKDAY(EOMONTH(I3,0))+1,7)-4)<4=EOMONTH(I3,0),EOMONTH(I3,0)-MOD(WEEKDAY(EOMONTH(I3,0))+1,7)-4,EOMONTH(I3,0)-WEEKDAY(EOMONTH(I3,0)-2))
The formula is working out which Monday is the best to return (last or 2nd to last) depending on how close it is to the last Friday of the month
Hope this makes sense