![]() |
Finding Next empty +1
is it possible to find next empty row and enter data into the next row??
|
Finding Next empty +1
Cells(Rows.Count,"A").End(xlUp).Offset(1,0).Value = "some value"
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "hellZg8" wrote in message ... is it possible to find next empty row and enter data into the next row?? |
Finding Next empty +1
There are a ton of ways
I always go to the bottom up in a column with contiguous data (Up to 2003) Dim lLastRow as Long lLastRow=Range("A65536").End(XlUp).Row lLastRow will now contain the number of the last row which can be used as a range address Range("A"&lLastRow).Copy etc For 2007 use 1048576 as the last row or for a mixed environment test for version If Application.Version11 Then lLastRow=Range("A1048576").End(xlUp).Row Else lLastRow=Range("A65536").End(xlUp).Row End If -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.nickhodge.co.uk blog (non-tech): www.nickhodge.co.uk/blog/ "hellZg8" wrote in message ... is it possible to find next empty row and enter data into the next row?? |
Finding Next empty +1
See
http://www.rondebruin.nl/last.htm If you want a database example see http://www.rondebruin.nl/copy1.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "hellZg8" wrote in message ... is it possible to find next empty row and enter data into the next row?? |
Finding Next empty +1
Thank you to all who replied
here's the thing this is an order form. can get it to enter data into every second row but it misses the start of the column "B16" The 1 st range goes from "B16:B74" entering data into every second row. the 2nd range goes form l16:l60 again entering data into every second row starting afterB16:B74 is filled with data then starting at "L16". Thank you in advance "Nick Hodge" wrote: There are a ton of ways I always go to the bottom up in a column with contiguous data (Up to 2003) Dim lLastRow as Long lLastRow=Range("A65536").End(XlUp).Row lLastRow will now contain the number of the last row which can be used as a range address Range("A"&lLastRow).Copy etc For 2007 use 1048576 as the last row or for a mixed environment test for version If Application.Version11 Then lLastRow=Range("A1048576").End(xlUp).Row Else lLastRow=Range("A65536").End(xlUp).Row End If -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.nickhodge.co.uk blog (non-tech): www.nickhodge.co.uk/blog/ "hellZg8" wrote in message ... is it possible to find next empty row and enter data into the next row?? |
Finding Next empty +1
Show your code.
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "hellZg8" wrote in message ... Thank you to all who replied here's the thing this is an order form. can get it to enter data into every second row but it misses the start of the column "B16" The 1 st range goes from "B16:B74" entering data into every second row. the 2nd range goes form l16:l60 again entering data into every second row starting afterB16:B74 is filled with data then starting at "L16". Thank you in advance "Nick Hodge" wrote: There are a ton of ways I always go to the bottom up in a column with contiguous data (Up to 2003) Dim lLastRow as Long lLastRow=Range("A65536").End(XlUp).Row lLastRow will now contain the number of the last row which can be used as a range address Range("A"&lLastRow).Copy etc For 2007 use 1048576 as the last row or for a mixed environment test for version If Application.Version11 Then lLastRow=Range("A1048576").End(xlUp).Row Else lLastRow=Range("A65536").End(xlUp).Row End If -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.nickhodge.co.uk blog (non-tech): www.nickhodge.co.uk/blog/ "hellZg8" wrote in message ... is it possible to find next empty row and enter data into the next row?? |
All times are GMT +1. The time now is 07:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com