Dear All,
I'm new to VBA and have found this site fantastic for learning and improving coding. That said I'm really struggling with a macro to select rows of data.
I have a spread sheet that is made up of product sub parts. At the beginning and end of each sub part is a sub total line. I need a macro that will select the sub part that the mouse has clicked on.
The a column of a sheet looks a bit like this:
x...A
1...Line Item
2...Sub Total
3...Line Item
4...Line Item
5...Line Item
6...Sub Total
If the cell a4 was selected I would need a macro that could select rows 3, 4, 5, 6. There will not always be the same number of line items in a part. Any Ideas!?
If anyone needs more info or a model sheet then please let me know and I'll get it up.
Many thanks for any help and advice offered!
I'm new to VBA and have found this site fantastic for learning and improving coding. That said I'm really struggling with a macro to select rows of data.
I have a spread sheet that is made up of product sub parts. At the beginning and end of each sub part is a sub total line. I need a macro that will select the sub part that the mouse has clicked on.
The a column of a sheet looks a bit like this:
x...A
1...Line Item
2...Sub Total
3...Line Item
4...Line Item
5...Line Item
6...Sub Total
If the cell a4 was selected I would need a macro that could select rows 3, 4, 5, 6. There will not always be the same number of line items in a part. Any Ideas!?
If anyone needs more info or a model sheet then please let me know and I'll get it up.
Many thanks for any help and advice offered!