Forum Discussion
hiding rows based on condition
- Jul 11, 2022
Sure.
Do you see an area below the reply box with "Drag and drop here or browse file to attach"? If so, drag your workbook into that area.
Otherwise, you can upload the workbook to a cloud service such as OneDrive, Google Drive or Dropbox, share it and post a link to the shared file in your reply.
- ajl_ahmedJul 11, 2022Iron Contributor
I have three pages in the “Sheet1” of the "test3" excel file, I need to create four buttons to:
- Button 1: display and print Page 1 only and hide blanks cells "if found" based on the content of cell “A” , (if it includes a name or not in each row)
- Button 2: display and print Page 2 only and hide blanks cells "if found" based on the content of cell “A” , (if it includes a name or notin each row)
- Button 3 display and print Page 3 only and hide blanks cells "if found" based on the content of cell “A” , (if it includes a name or notin each row)
- Button 4: display all pages and hide blanks cells "if found" based on the content of cell “A” , (if it includes a name or notin each row)
- HansVogelaarJul 11, 2022MVP
Where do you want the buttons? We can't place them next to one of the three pages because they might be hidden?
- ajl_ahmedJul 11, 2022Iron Contributor
ca you put it at the first row starting from C1 before the row of student name and degree?
- ajl_ahmedJul 11, 2022Iron Contributor
Good Evening
Sorry for disruption
I have applied the code with some modifications on the number only. However, I have faced some problems in specifying the page print area. I decided to send you the original file "AA enabled macro + Hidden row" and write here some notes as below:
In the "AA enabled macro + Hidden row", original file:
- I set rows 1 to 11 to repeat at the top when printing each page.
- Before applying the macro which hides blank rows, the Page 1 border is (A12:AG46), the Page 2 border is (A47:AG81), the Page 3 border is (A82:AG119)
- When applying the hiding macro, I need the last three rows(A117:AG119) to appear at the end of each page when clicking on buttons 1,2,3, and All. In addition when doing the printing process. see the attached picture which shows the problem is.
- I need the process of hiding rows based on the condition of existing text on yellow cells.
- As I said before, I have three pages in the “Sheet1” of the "test3" excel file, I need to create four buttons to:
- Button 1: displays Page 1 only and hides blanks cells "if found" based on the content of cell “B-Yellow Cell”, (if it includes a name or not in each row)
- Button 2: displays Page 2 only and hides blanks cells "if found" based on the content of cell “B-Yellow Cell”, (if it includes a name or not in each row)
- Button 3 displays Page 3 only and hides blanks cells "if found" based on the content of cell “B-Yellow Cell”, (if it includes a name or not in each row)
- Button 4: displays all pages and hide blanks cells "if found" based on the content of cell “B-Yellow Cell”, (if it includes a name or not in each row)
- Button 5: Print the displayed page
Also, I sent you "test5" file after applying the hidden rows code and a picture shows the problem.
Many thanks in advance
Regards
- HansVogelaarJul 11, 2022MVP
Sorry, that's too complicated for me.