![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
I have a table like
Tea Coffee Total Tecpak two Tecpak two Tecpak two Tecpak two Tecpak two Tecpak two Tecpak two Tecpak two Tecpak two Tecpak two Tecpak two Total what i am doing is selecting a name on one sheet as a variable such as Tecpak two Total how do I then select all of the other rows with Tecpak two but not select Tea Coffee Total Anyone have any ideas the variable will change?? _________________ [ This Message was edited by: brettvba on 2002-05-09 20:01 ] [ This Message was edited by: brettvba on 2002-05-09 20:44 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Apr 2002
Location: Australia
Posts: 52
|
hold down ctrl when selecting them
|
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
No with code and ctrl would select right up to the top anyway any others?
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
No SHIFT would select them all. CTRL allows you to select one at a time.
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
if you hold ctrl and press up it goes to the next space in the row or in my case the very top or bottom.
What I was really asking was in vba code to select the like names or basically it selects the total one first this selects up till just before it reaches the second total anyone have any ideas>? |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
We know you were asking for VBA code, but not from your first post. Anyway this code will do it. The data is assumed to be situated on Sheet1 in column A:
HTH _________________ [b] Mark O'Brien [ This Message was edited by: Mark O'Brien on 2002-05-09 20:32 ] |
|
|
|
|
|
#7 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Christchurch New Zealand
Posts: 1,030
|
Thats was my request exactually it thanks Mark
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|