Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to get last row used in sheet DATA

Hi,

Just saw this code a few hours ago but can't find it back

The code will tell me that there is that many row used in the sheet
From that info, I will be able to put my next line of data.

Thanks

Alai

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default How to get last row used in sheet DATA

THere is a last row example on my website

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"alainB " wrote in message
...
Hi,

Just saw this code a few hours ago but can't find it back

The code will tell me that there is that many row used in the sheet.
From that info, I will be able to put my next line of data.

Thanks

Alain


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to get last row used in sheet DATA

Hi,

It is not what I saw.

Was very simple, maybe less than 30 letters. I think it is to give th
number of rows used in the sheet.

Thanks

Alai

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default How to get last row used in sheet DATA

Hi
maybe try
msgbox activesheet.usedrange.rows

-----Original Message-----
Hi,

It is not what I saw.

Was very simple, maybe less than 30 letters. I think it

is to give the
number of rows used in the sheet.

Thanks

Alain


---
Message posted from http://www.ExcelForum.com/

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default How to get last row used in sheet DATA

UsedRange is alright, as long as you know it's not always going to be the
"real" last row until you've saved.

Alain, maybe it's:
lngLastRow = ActiveSheet.Range("A65536").End(xlUp).Row
That determines the last row based on the last entry in column A


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Frank Kabel" wrote in message
...
Hi
maybe try
msgbox activesheet.usedrange.rows

-----Original Message-----
Hi,

It is not what I saw.

Was very simple, maybe less than 30 letters. I think it

is to give the
number of rows used in the sheet.

Thanks

Alain


---
Message posted from http://www.ExcelForum.com/

.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to get last row used in sheet DATA

Hi,

Thanks.

Almost that Frank!

x= Sheets("DATA").UsedRange.Rows.Count
Msgbox x

It gives me what I need.

Thanks everybody.

Alai

--
Message posted from http://www.ExcelForum.com

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default How to get last row used in sheet DATA

Perhaps you could use a variation of one of these:
=Offset(A1,CountA(A:A)-1,0)
OR my personal favorite:
Selection.End(xlDown).Select
This finds the last non-empty cell.
-----Original Message-----
Hi,

Just saw this code a few hours ago but can't find it back

The code will tell me that there is that many row used in

the sheet.
From that info, I will be able to put my next line of data.

Thanks

Alain


---
Message posted from http://www.ExcelForum.com/

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy rows from one Data sheet to another sheet based on cell conte John McKeon Excel Discussion (Misc queries) 2 May 15th 10 06:49 AM
Duplicate sheet, autonumber sheet, record data on another sheet des-sa[_2_] Excel Worksheet Functions 0 May 8th 08 06:56 PM
Hyperlinking from data in one sheet to matching data in another sheet Phrank Excel Worksheet Functions 6 December 18th 07 09:58 AM
create a formula in one sheet that would read data from separate sheet automatically QD Excel Discussion (Misc queries) 0 December 8th 06 04:17 AM
pull data from sheet two, then fill in the data to sheet one (part Jim Excel Worksheet Functions 3 December 11th 04 04:51 AM


All times are GMT +1. The time now is 03:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"