Last used row

Dear sir,with best regards,i have in my worksheet more than (10000) used
rows,how can i reach the last row which is full of data directly ( by a
code )
Many thanks in advance.




-- 
tofimoon4
0
3/30/2012 10:43:05 AM
excel.newusers 15348 articles. 2 followers. Follow

3 Replies
1563 Views

Similar Articles

[PageSpeed] 37

Assuming Column A represents all rows.........go to bottom of sheet
then come up to last filled cell.

Sub select_last()
Dim rng As Range
    Set rng = Cells(Rows.Count, 1).End(xlUp)
    msgbox rng.Address
End Sub


Gord

On Fri, 30 Mar 2012 10:43:05 +0000, tofimoon4
<tofimoon4.9bb6f48@excelbanter.com> wrote:

>
>Dear sir,with best regards,i have in my worksheet more than (10000) used
>rows,how can i reach the last row which is full of data directly ( by a
>code )
>Many thanks in advance.
0
phnorton (279)
3/30/2012 2:47:17 PM
'Gord Dibben[_2_ Wrote: 
> ;1600287']Assuming Column A represents all rows.........go to bottom of
> sheet
> then come up to last filled cell.
> 
> Sub select_last()
> Dim rng As Range
> Set rng = Cells(Rows.Count, 1).End(xlUp)
> msgbox rng.Address
> End Sub
> 
> 
> Gord
> 
> On Fri, 30 Mar 2012 10:43:05 +0000, tofimoon4
> <tofimoon4.9bb6f48@excelbanter.com> wrote:
> -
> >
> >Dear sir,with best regards,i have in my worksheet more than (10000)
> used
> >rows,how can i reach the last row which is full of data directly ( by
> a
> >code )
> >Many thanks in advance.-

Dear sir,with my thanks to your solution,i need a code that will guide
me to the last used row directly not point only.
My regards.




-- 
tofimoon4
0
4/1/2012 5:17:25 PM
rng.Select


Gord


On Sun, 1 Apr 2012 17:17:25 +0000, tofimoon4
<tofimoon4.9be66a8@excelbanter.com> wrote:

>
>'Gord Dibben[_2_ Wrote: 
>> ;1600287']Assuming Column A represents all rows.........go to bottom of
>> sheet
>> then come up to last filled cell.
>> 
>> Sub select_last()
>> Dim rng As Range
>> Set rng = Cells(Rows.Count, 1).End(xlUp)
>> msgbox rng.Address
>> End Sub
>> 
>> 
>> Gord
>> 
>> On Fri, 30 Mar 2012 10:43:05 +0000, tofimoon4
>> <tofimoon4.9bb6f48@excelbanter.com> wrote:
>> -
>> >
>> >Dear sir,with best regards,i have in my worksheet more than (10000)
>> used
>> >rows,how can i reach the last row which is full of data directly ( by
>> a
>> >code )
>> >Many thanks in advance.-
>
>Dear sir,with my thanks to your solution,i need a code that will guide
>me to the last used row directly not point only.
>My regards.
0
phnorton (279)
4/1/2012 11:42:53 PM
Reply:

Similar Artilces:

Can I use an IF ELSE statment
Is it possible to use this type of syntax in Excel - eg IF(c6<8,c6)ELSE MROUND(c6,0.25) What am I doing incorrectly? Thanks Eidin The IF function has three parts to it... the logical test, the true result and the false result. The false result part is equivalent to your ELSE attempt. Try writing your formula this way... =IF(C6<8,C6,MROUND(C6,0.25)) -- Rick (MVP - Excel) "Eidink" <Eidink@discussions.microsoft.com> wrote in message news:AFEB1B9D-70D0-47B8-9E78-815E9D55B134@microsoft.com... > Is it possible to use this type of syntax in Excel - e...

"Sent on Behalf of" using Outlook 2002 with Exchange 5.5
We're using Outlook 2002 with Exchange 5.5. I've setup the delegates and permissions correctly in order to send on behalf. The problem I'm having is that when the recipient receives the message, it doesn't state anywhere that the message was "Sent on Behalf of". what i need to do Are you sure you didn't assign "Send As" permission instead of "Send on Behalf of" permission? -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. ...

changing cbobox row source through vba code
Hi All, I have a frame which has 2 option.Option 1 and 2. I also have a combo box. I want when option 1 in my frame is clicked, my combo box row source is "SELECT [List Model DC Query].[Model DC Fan] FROM [List Model DC Query], [Model AC Query] ORDER BY [List Model DC Query].[Model DC Fan];" and when the 2nd option of frame is clicked,it row source becomes "SELECT [Model AC Query].[Model DC Fan] FROM [List Model DC Query], [Model AC Query] ORDER BY [Model AC Query].[Model DC Fan];" please help to write the code and on what control even have to be placed. regards, cho ...

Using SqlDataAdapter for Insert but not Update?
I'm having trouble getting my SqlDataAdapter to NOT overwrite existing records in my SQL table. I'd like it to perform the Insert on rows that don't exist, but not update the record if it already exists. I have it set to ContinueUpdateOnError because I don't want it to throw an exception if a row already exists, I just want to ignore it. I'm clearly missing something... On Dec 11, 4:46=A0pm, Stu <stumor...@gmail.com> wrote: > I'm having trouble getting my SqlDataAdapter to NOT overwrite existing > records in my SQL table. =A0I'd like it to pe...

Will excel add cells using colour coding eg Add all red cells
I have colour coded a spreadsheet and would like to set a cell to recognise the couloured cells and add all these cells to a total Not sure if you can actually add colored cells. What is the content inside the cell? If there is a pattern, you can try a few things to get a sum. -- cparaske ------------------------------------------------------------------------ cparaske's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3793 View this thread: http://www.excelforum.com/showthread.php?threadid=477902 Nothing built in http://www.cpearson.com/excel/colors.htm ...

Use of Worksheet Tab Name
Want to put a new name on a worksheet tab (which I know how to do) and then reference that TAB on the work sheet. For example, if I name a worksheet XYZ, need a process where I can say Cell A1 (or whatever) = TAB NAME (XYZ or anything). How do I do that? one way: =MID(CELL("filename",A1), FIND("]", CELL("filename",A1))+1, 255) In article <Grampa425.sxppz@excelforum.com>, Grampa425 <Grampa425.sxppz@excelforum.com> wrote: > Want to put a new name on a worksheet tab (which I know how to do) and > then reference that TAB on the work sheet. ...

using access database on a mac
Hi. Over the years I've developed an access database which uses 30+ tables, queries, forms, reports, macros etc. Using replication the rest of my department have been able to use the dbase on their laptops. It's a school department and the database keeps pupil records, extra-curricular details, resource information etc. Now however it looks like we are going to switch to Mac's. I would be grateful if someone could give me possible solutions. All the machines would have internet access. many thanks On Sat, 8 Mar 2008 12:02:41 -0800 (PST), barnimup <barnimup@googlemail.com...

using windows mail
when I try to send through window mail, I get error msg. error10060 OX800cccoe Please post the error message in its entirety. You can left click on it to highlight and then right click to copy and then paste it into this thread. -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "Jeanne" <Jeanne@discussions.microsoft.com> wrote in message news:F393030B-D730-4AE9-8BD4-856087C52EA6@microsoft.com... > when I try to send through window mail, I get error msg. error10060 > OX800cccoe > Jeanne, try Meghan's reply up abo...

SumProduct using greater than
I have the following formula =SUMPRODUCT(('All Resource Plan'!$B$3:$B$42=Principal)* ('All Resource Plan'!D$3:D$42>0)) Where B3 to B42 on the all resource plan tab have a variety of roles including principal. On the same tab d3 to d42 is a range of numbers from -1 to +1. I need to sum all values associated with a role that are greater than 0. I was using this formula with an =1 and it worked fine, however when I changed it to >0 it no longer works. Any help would be appreciated. First of all, you are counting not summing, secondly the formula works for me....

Problems using Word as Editor
Am using Office/Outlook 2000. My OS is Windows XPMCE. This just started where I get this error statement: Can't open this item. Microsoft WordMail could not be started. Try one of the following: Close any open dialog boxes in Word. Make susre Word is installed correctly. Close other programs and try again. If I quit Word from the task box or restart my computer, I can open an email and read it in Word because the computer reloads it. If I try to open another or try to write an email I get the message. I've tried reinstalling Office but the problem still persists. I've never had th...

Need a way to use current stock of preprinted checks with Money
I have a large amount of preprinted checks from another accounting package that I no longer have a use for and would like to use them with Microsoft Money. I currently have 2004 small business edition. The checks I have are preprinted and have one check per page (at the bottom of each page). Is there way to use these with Money? If not is there a software package that is compatible with money that I can use these checks with? ...

segfault! with CImage::GetBits() in CE 3.0/5.0 if LoadFromResource() is used, why???
If I use CImage::GetBits() to retrieve the pointer to the bits of a bitmap which was loaded with LoadFromResource(), any attempt to access that pointer results in a segfault! I've spent 5 hours on this (yeah I'm a little slow) and I realize it must be an undocumented "feature" of Windows CE. *Please* document this problem. When I checked the value of the pointer I was getting, I noticed it was "128" - sounds pretty low! Is that system memory maybe? Wherever it is, my app isn't allowed there. Code: CImage *image = new CImage(); if (!image) return -1; H...

how can I enter 453. to show as 453 instead of 4.53 when using th.
I'm not sure how to use the decimal when entering numbers in excel. I want to use the fixed decimal space as to so when I just type in 453 it appears as 4.53 But when I want to enter 60 and I enter 60. I get .60 Any thoughts? Enter 60. with the decimal point at the end. In article <B343D637-7039-48CA-AB16-6B389D3A441A@microsoft.com>, "Scott" <Scott@discussions.microsoft.com> wrote: > I'm not sure how to use the decimal when entering numbers in excel. I want > to use the fixed decimal space as to so when I just type in 453 it appears as >...

How can I eliminate rows that contain the same data as the row ab.
How can I compare rows in Excel aand eliminate those rows that have duplicate information in them? Use data>filter>advanced filter, select unique records only -- Regards, Peo Sjoblom "mjlucas49" <mjlucas49@discussions.microsoft.com> wrote in message news:56E5DD0C-E9D0-4C25-8956-C96F285D320B@microsoft.com... > How can I compare rows in Excel aand eliminate those rows that have duplicate > information in them? ...

Having a row adjust in height to accommodate text entry
In a form that I'm developing I have 4 columns and 5 rows. I would like for the row height of all rows to automatically adjust to accommodate the text entry in any given colum/cell. Is there an easy way to accomplish this? Will it make a difference whether the worksheet is protected or not? -- John On Thu, 7 Jan 2010 10:50:06 -0800, John wrote: > In a form that I'm developing I have 4 columns and 5 rows. I would like for > the row height of all rows to automatically adjust to accommodate the text > entry in any given colum/cell. Is there an easy way to ...

Using Office on Mac: Some basic questions
I've been using a PC with Microsoft Windows for years, and I'm totally fed up with it. I'm thinking seriously about getting a Mac, but I need to have Microsoft Office. Is there a Mac version for this? Do I need to install it in parallel? Does it work reliably? paulinefiddle <paulinefiddle@gmail.com> wrote: > I've been using a PC with Microsoft Windows for years, and I'm totally > fed up with it. I'm thinking seriously about getting a Mac, but I > need to have Microsoft Office. Is there a Mac version for this? Do I > need to install it...

POP connectors......which one do you use
Hi I have just setup xchange 2k3 on a 2k3 server and all seems good,i needto be able to download mail from my isp pop server to my xchange server It appears you need 3rd party tools to do this so my question is which is the best and which is free!! Your thoughts are appreciated Regards S -- Simon Whyley MCP XP,2Kpro Comptia A+ (lol) Message posted via WinServerKB.com http://www.winserverkb.com/Uwe/Forums.aspx/exchange-administration/200508/1 The best answer is don't. Beg (if it takes it) the ISP to give you an SMTP feed. Bribe them etc. etc. When all that falls on stony ground ...

Using outlook express, want to start using microsoft outlook,how?
Currently using outlook express, but need to start using microsoft outlook, can anyone advise how? I have tried the tools, options, general route and this doesn't work, and other ideas please. Thanks, Sharon juliansoffice <juliansoffice@discussions.microsoft.com> wrote: > Currently using outlook express, but need to start using microsoft > outlook, can anyone advise how? I have tried the tools, options, > general route and this doesn't work, and other ideas please. What exactly are you trying to do? Create an account? Install it? What? What version? -- Brian...

using outlook w act
I have recently tried to use outlook 2002 in conjunction w my ACT program. The ACT program is indicating that it cannot integrate the e mail portion because i have an old version of outlook 98. this is not correct as the version that i have is outlook 2002. has anyone experienced this? if so please contact me and assist in the fix on this problem. your assistance is greatly appreciated. Try Act! support - it is not an Outlook issue. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-mails sent to my actua...

using calendar on a peer to peer network
We do not have a network server but would like to be able to share a calendar. Is this possible on a network where we can only share files? You can use the following third party tool for that; http://www.shareasale.com/r.cfm?b=21318&u=108016&m=4861&urllink=&afftrack= For additional solutions see; http://www.slipstick.com/outlook/share.htm -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -Backup and Restore -Create an Office XP CD slipstreamed with Service Pack 3 ----- "sandy" <anonymous@discussions.microsoft.com> wrote in messa...

Downloading Mail From Hotmail Using Outlook
Downloading Mail From Hotmail Using Outlook I am newbie to Outlook. Yesterday I was about to download email from one of my Hotmail accounts but not from the other but it said it was a paid service. I think it's like $50 a year to do this. How can this be that I was able to do it with another Hotmail account but not another? All I want to do is clear out my messages from one of my Hotmail acounts and close it down. I don't want to pay $50 to save my email. Does anyone know anything about this? Thanks Matt ____________________________________________________________________...

Can 2 Union Queries Be used in Another UNION ??
I have created 2 separate Union Queries that work just fine. Can these 2 union queries be used in Another Union query (that will essentially combine the output of those 2)? Thanks very much, Kev -- Message posted via http://www.accessmonster.com Yes, as long as the two union queries are outputting data in the same structure and as long as the query engine doesn't decide that the combination of the union queries is too complex. Have you tried to do this? If so, did it fail? And if it failed were there any error messages? -- John Spencer Access MVP 2002-2005, 2007 Center for H...

How to retreive deepest XPath value from XML using VB.NET
This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C63D0B.9BCC4D30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi All, Does anyone know how to retreive deepest XPath value from XML document = by using VB.NET? For example, if I had an XML file like this: <Root> <Customer> <Name>MyName</Name> </Customer> </Root> I would like to retreive "\Root\Customer\Name" out of it. Something = like: Dim xmlDoc As XMLDocument Dim strXPath As String =3D xmlDoc.GetXPa...

Need to import select Access data into Excel using two variables
I have a large amount of data in Access, more than Excel can manage. The data consists of many columns; has Col_1 as unique key 1,2,3,4,5,6,7,8 etc… and contains data that includes Col_2, Col_3, Col_4 etc…. It takes a combination of Col_2 and Col_3 to get the data I want. Col_2 has duplicate values and Col_3 makes the subset unique. One more thing… Col_3, Col_4 etc…may have blanks throughout the table and can’t be changed. I don’t own it. I want to be able to open Excel, type “Number from Col_2” into Col_A , “(Number fromCol_3) or (blank)”into Col_B and have the Col_4, Col_5 etc… d...

Extracting Data from Access dB to Excel, using VBA
Hi All, Firstly, I'm an amateur on a steep learning curve, so please excuse me if some of my terminology/understanding is incomplete. I have found a VBA procedure which will extract entire tables from a db to a grid array in an excel spreadsheet. The procedure relies on two cell values, one identifies the database path, the other identifies the required table. When the procedure is run, it evaluates the two values and returns the specified table in its entirety. The problem I am having is that it works perfectly for tables that have no 'dead-space', ie blank fi...