How to get the value of the last day of the month but not Saturday and Sunday?

Hello team, please help:
Is there a way to find a certain value in a col and get its position?
Is there a way to get the value of the last day of the month but not Saturday and Sunday? ? Thanks all!