Mask cells in Excel

Posts
351
Registration date
Sunday July 5, 2009
Last seen
November 28, 2018
-
Hello,

I created a calendar / schedule under Excel with one month per sheet.
Depending on the month. So for the month of February, for example, dates until the 28th (for this year) and for March until the 31st.

I would like the lines corresponding to 01, 02 and 3 March (for February) to be automatically masked so that my painting finishes on the 28th, and so on for the other months.
Would anyone have a solution to offer me?

I attach to this post a screenshot for better understanding

Thank you for your help.

See more 

Your reply

1 reply

Posts
2435
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 4, 2018
0
Thank you
Hi Cameleon,

Here we communicate in english.

Your question using google translate:
Hello,

I created a calendar / schedule under Excel with one month per sheet.
Depending on the month. So for the month of February, for example, dates until the 28th (for this year) and for March until the 31st.

I would like the lines corresponding to 01, 02 and 3 March (for February) to be automatically masked so that my painting finishes on the 28th, and so on for the other months.
Would anyone have a solution to offer me?

I attach to this post a screenshot for better understanding

Thank you for your help.


Not sure why you can't do this manually, but if you like a macro to do this and you only have 12 sheets (so only the month sheets), then give this code a try to hide (=mask?) rows which contain a date with a different month then the one in B14:
Sub RunMe()
Dim ws As Worksheet
Dim mMonth As Integer

For Each ws In Worksheets
    ws.Select
    mMonth = Month(Range("B14"))
    For Each cell In Range("B14:B44")
        If Month(cell.Value) <> mMonth Then
            cell.EntireRow.Hidden = True
        End If
    Next cell
Next ws

End Sub


Hopefully you understand english ...

Best regards,
Trowa
Respond to TrowaD