Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 204
Default Determine cell address of last entry in a row

I need to find the column number of the last entry in a row. I tried this but
it doesn't seem to work

MaxA = Sheets("A Grade").Cells(Columns.Count, "5").End(xlLeft).Column

I'm trying to find the column address of the last entry in the 5th row down.

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Determine cell address of last entry in a row

the below will give you the column number of the last entry in Row 1

lngLastCol = ActiveSheet.Cells(1, Columns.Count).End(xlToLeft).Column

If this post helps click Yes
---------------
Jacob Skaria


"NDBC" wrote:

I need to find the column number of the last entry in a row. I tried this but
it doesn't seem to work

MaxA = Sheets("A Grade").Cells(Columns.Count, "5").End(xlLeft).Column

I'm trying to find the column address of the last entry in the 5th row down.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Determine cell address of last entry in a row


NDBC,

Try:


Code:
--------------------


Dim MaxA As Long

MaxA = Sheets("A Grade").Cells(5, Columns.Count).End(xlToLeft).Column


--------------------



Have a great day,
Stan


--
stanleydgromjr
------------------------------------------------------------------------
stanleydgromjr's Profile: http://www.thecodecage.com/forumz/member.php?userid=503
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=118352

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 204
Default Determine cell address of last entry in a row

Thanks Stanley, I had already modified Jacobs code to that. Thanks again
Jacob. I'm starting to wonder if you ever sleep.

"stanleydgromjr" wrote:


NDBC,

Try:


Code:
--------------------


Dim MaxA As Long

MaxA = Sheets("A Grade").Cells(5, Columns.Count).End(xlToLeft).Column


--------------------



Have a great day,
Stan


--
stanleydgromjr
------------------------------------------------------------------------
stanleydgromjr's Profile: http://www.thecodecage.com/forumz/member.php?userid=503
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=118352


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
seperate components of a whole address entry telly Excel Discussion (Misc queries) 5 May 29th 09 11:50 AM
VB code to determine address of activeworkbook Kevin Excel Discussion (Misc queries) 2 January 5th 08 01:57 AM
How to determine the column letter from Cell address Jean Excel Worksheet Functions 6 July 24th 06 03:04 AM
automatic address and phone cell entry flamingo1 Excel Worksheet Functions 1 March 27th 06 05:50 PM
Determine if Cell Address is within a Range John Michl Excel Worksheet Functions 4 December 22nd 05 07:59 PM


All times are GMT +1. The time now is 07:58 AM.

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

About Us

"It's about Microsoft Excel"