PDA

View Full Version : Help with hiding rows based on content of a cell



kepanac
01-08-2020, 02:08 AM
Hi can anyone help me with some code for hiding rows.

I have a cell, let's say A1, where you can input the words "apple" or "orange".

In cell A4 I have the word "apple", in cell A5 I have the word "orange", in cell A6 I have the word "apple" also.

If I put the word "apple" in cell A1, I would like hide the rows that show "orange" in column A. If I put the word "orange" in A1, I would like to hide the rows that show "apple" in column A.

This is simplified example of what I'm trying to achieve, I actually have quite a few more fruits. I would like to find a way where I can have a code that says: in the range of rows 4 to 6, I only want to show rows where column A = the content of cell A1.

Any help would be much appreciated!