Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to select multiple rows (so I can then sort them)
This is what I have so far: Do While Worksheets(I).Cells(InputRow, 1).Value < "" Rows(InputRow).Select InputRow = InputRow + 1 Loop But it just highlights the specific row everytime it goes through th loop and the one that was highlighted is not anymore. I want to have the rows STAY highlighted after it goes through th loop. Thanks: -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Are you SURE you want to select all those rows? I ask because, wit
VERY few exceptions, it is just as effective and MUCH faster to do th same job without selecting anything at all. If you post a little mor detail about what you're trying to accomplish maybe we could make som suggestions about how you're going about it. - Piku -- Message posted from http://www.ExcelForum.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Well I am trying to find a way to sort a certain number of cells
alphabetically. Selecting the rows, then sorting them is the only wa I could think of doing it. For example say i have this Row 34: Burkom, Diane Row 35: Hartford, Pamela Row 36: Adrian, Steve Row 37: (Blank) InputRow currently has the value 34, and so I want to be able to onl sort rows 34 through 36. Make better sense? Please let me know. Thanks Cheer -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like
Do While Worksheets(I).Cells(InputRow, 1).Value < "" Range(Cells(1, 1), Cells(InputRow, 1)).EntireRow.Select InputRow = InputRow + 1 Loop -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "almostthere " wrote in message ... I want to select multiple rows (so I can then sort them) This is what I have so far: Do While Worksheets(I).Cells(InputRow, 1).Value < "" Rows(InputRow).Select InputRow = InputRow + 1 Loop But it just highlights the specific row everytime it goes through the loop and the one that was highlighted is not anymore. I want to have the rows STAY highlighted after it goes through the loop. Thanks:) --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Chip Pearson wrote:
[b]Try something like Do While Worksheets(I).Cells(InputRow, 1).Value < "" Range(Cells(1, 1), Cells(InputRow, 1)).EntireRow.Select InputRow = InputRow + 1 Loop Worked Great!!! ![]() -- Message posted from http://www.ExcelForum.com |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I had a little trouble with that code because it would highlight all o
the rows above InputRow. So what I did was create another variabl ("InputRow2") and did not change that variable in the loop. Jus posting this in case someone else is has same question. Dim InputRow As Integer Dim InputRow2 As Integer InputRow = 55 InputRow2 = InputRow Do While Worksheets("Summary").Cells(InputRow, 1).Value < "" Range(Cells(InputRow2, 1), Cells(InputRow, 1)).EntireRow.Select InputRow = InputRow + 1 Loop End Su -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select multiple rows not next to each other | Excel Worksheet Functions | |||
select multiple rows and format | Excel Discussion (Misc queries) | |||
Filter/Select multiple rows | Excel Discussion (Misc queries) | |||
How do I select multiple rows randomly in MS Excel? | Excel Discussion (Misc queries) | |||
Select all data, multiple rows | Excel Discussion (Misc queries) |