You can do it all in Excel. Start with a cell that has the first day of the month, create another cell that has the last day of the month, then determine what day is the first Friday of the month, and then figure out how many weeks (Fridays) are there between the first Friday and the last day of the month.

If cell A1 has the first day of the month, then create the last day of the month in B1 with the formula "=EOMONTH(A1,0)". You can find the first Friday of the month using the WEEKDAY and MOD functions. In C1, put in the formula "=WEEKDAY(A1,2)". This will result in a 1 if it is Monday, 2 if it is Tuesday, etc.., and 5 if it is a Friday. In D1, put in the formula "=MOD(C1,5)", which will tell you how many days from Friday the first day of the month is. Now you can add 7 days to the first day of the month and subtract D1 to get the first Friday of the month (take care of the special case where the first day of the month is Friday). Combining it all into one formula in cell E1, "=A1+IF(WEEKDAY(A1,2)=5,0,7)-MOD(WEEKDAY(A1,2,5)" gives you the first Friday of the month. Now calculate the number of days between the first Friday and the end of the month in cell F1: "=B1-E1". Divide by 7 and take the integer part in cell G1: "=INT(F1/7)". This tells you how many Fridays are between the first Friday and the end of the month, so add 1 for the first Friday, and you have the answer you are looking for.

If cell A1 has the first day of the month, then create the last day of the month in B1 with the formula "=EOMONTH(A1,0)". You can find the first Friday of the month using the WEEKDAY and MOD functions. In C1, put in the formula "=WEEKDAY(A1,2)". This will result in a 1 if it is Monday, 2 if it is Tuesday, etc.., and 5 if it is a Friday. In D1, put in the formula "=MOD(C1,5)", which will tell you how many days from Friday the first day of the month is. Now you can add 7 days to the first day of the month and subtract D1 to get the first Friday of the month (take care of the special case where the first day of the month is Friday). Combining it all into one formula in cell E1, "=A1+IF(WEEKDAY(A1,2)=5,0,