paspuggie48
New Member
- Joined
- Jun 21, 2011
- Messages
- 35
I have not done a thorough search of all VBA subjects in relation to Hide/Unhide certain cells etc but this is my problem in respect of a previous post I wrote. What I would like to do is create a macro with VBA and have it auto hide lines. However, my ranges change all the time but I do have fixed characters/text in certain cells. What I am thinking is if it finds these fixed text cells that a macro can then automatically hide the rows in between.
So....this is what I have in basic form. I'll write the Row number, then in Cell A1 is AAA, Cell A2 is 1, etc etc
Row 1 - AAA
Row 2 - 1
Row 3 - 2
Row 4 - 3
Row 5 - 4
Row 6 - 5
Row 7 - 6
Row 8 - 7
Row 9 - 8
Row 10 - BBB
Is it easy to write some VBA to say find the Cells that contain the text AAA and BBB and whatever cells are in between this range to have the macro auto hide those rows??
I ask this because as mentioned my ranges change, so another day BBB could be on Row 25, or 50 or whatever.
Any help would be much appreciated
Regards
Paul
So....this is what I have in basic form. I'll write the Row number, then in Cell A1 is AAA, Cell A2 is 1, etc etc
Row 1 - AAA
Row 2 - 1
Row 3 - 2
Row 4 - 3
Row 5 - 4
Row 6 - 5
Row 7 - 6
Row 8 - 7
Row 9 - 8
Row 10 - BBB
Is it easy to write some VBA to say find the Cells that contain the text AAA and BBB and whatever cells are in between this range to have the macro auto hide those rows??
I ask this because as mentioned my ranges change, so another day BBB could be on Row 25, or 50 or whatever.
Any help would be much appreciated
Regards
Paul