View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ian Ian is offline
external usenet poster
 
Posts: 238
Default highlight group of rows

On the sheet you want to copy from:
Right click on the tab name and select View Code
In the new Visual Basic window:
At the top of the new window, where it says General, click the down arrow
next to it and select Worksheet
In the large window you will see the first and last lines of the code.
Copy the other lines of code between these supplied then close the Visual
Basic window.
Back on your sheet:
The code will run automatically and every time you click on another cell,
that row and the 2499 rows below will be selected.
Click the first row you want copied
Go to EditCopy (or Ctrl-C)
In your destination sheet
Select the row where you want the data to start (column A, I assume)
Go to EditPaste (or Ctrl-V)



--
Ian
--
"Don Guillett" wrote in message
...
or
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
mr = Target.Row
Range(Cells(mr, 1), Cells(mr + 2499, Columns.Count)).Select
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ian" wrote in message
...
If all you want to do is select 2500 rows buy clicking on a cell, then
the following will do.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Range("A" & ActiveCell.Row, "A" & ActiveCell.Row + 2499).EntireRow.Select
End Sub

This will select the current row and the following 2499 (2500 in total).

It's not a lot of use as it stands and clicking elsewhere in the sheet
will automatically change the selection. It's not clear from your post
exactly what you need to do, except to subject lots of unfortunates to
junk mail :-)

--
Ian
--
"lilleke" wrote in message
...
work with Excel 2000 - direct mail databases - I would like to be able
to
start on any row I choose and have a macro to choose the very next 2500
rows.
Is this possible?
--
claudia