How to create a macro to hide entire rows if column c from 38:95 state "Not Used". Hopefully it won' tbe a problem that columns c through j at merged. Thanks!
How to create a macro to hide entire rows if column c from 38:95 state "Not Used". Hopefully it won' tbe a problem that columns c through j at merged. Thanks!
Is the end row 95 always 95 or likely to change? Do you want the macro to be flexible to consider any number of rows?
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
It should at this time always be 95 or 96. I would like for it to consider all the rows. Right now just looking at the worksheet briedly, I have 4 rows that I can see on my screen and I know there are more. Thanks!
Try this code
Copy the Excel VBA codePlease Login or Register to view this content.
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose View | Macros
Select a macro in the list, and click the Run button
Awesome. That is great. Am I able to just replace the word "Not Used" with 0 and change the name of the macro and the range from c to a and hide all the cells from a38 to a95. This will hide all rows if they contain zero in column A? Thanks again for your help.
Yes, you do not need to change the name of the macro, if you want to for your own reference, you can do it, but it wont affect the running of the macro.
Awesome. Thank you so much. I am very new to Macros and I am learning very slowly. Thank you so much! :-)
Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.
In future, to mark your thread as Solved, you can do the following -
Select Thread Tools-> Mark thread as Solved.
Incase your issue is not solved, you can undo it as follows -
Select Thread Tools-> Mark thread as Unsolved.
Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
Sorry, I went to lunch and just got back. I will go in and do everything. Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks