View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Code to select data

That may not work correctly. Try this experiment. Go back to the worksheet
with your sample data and type something into any cell on a row, say, ten
rows down from the current end of your data. Now delete that entry by
selecting the cell and hitting the Delete key on your keyboard. Now run your
code and the selection should go down to the row you entered and then erased
the entry on (which is, if you used my suggestion, ten rows below the shown
end of data).

--
Rick (MVP - Excel)


"Mike H" wrote in message
...
Hi,

Try this

Rows("2:" & Cells.SpecialCells(xlLastCell).Row).Select
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Anita" wrote:

Hi - I am using v2007 and want to know code for selecting from row 2 to
the
end of populated data in a spreadsheet. The length of the data will vary
everytime. Any help gratefully nreceived. Thanks. Anita