Excel VBA Code to hide rows based on multiple criteria on a different worksheet

Anonymous
2019-01-07T12:12:49+00:00

We have a workbook that we would like to hide rows on one worksheet based on multiple criteria on another worksheet. Basically we would like the user to choose a client name and then fill in various fields on the main worksheet. The code will need to check the name of the client and then based on whether the other fields are blank or contain an number it will need to hide various rows on the other worksheet.

Any ideas?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Doug Robbins - MVP - Office Apps and Services 322.1K Reputation points MVP Volunteer Moderator
    2019-01-08T09:45:12+00:00

    Use

    Sheets(#).Rows(#).EntireRow.Hidden = True

    replacing the # with the required numbers for the sheet and the row to be hidden.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful