Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Incrementing row number

Is there a command that simply increments the row number?

I know you can use the command cells(x,x) to select the specific cell
but I would like to increment the row number, without prior knowledge
of where I was.

Also is there a command that returns the current active cell?

- D

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Incrementing row number


Hi Denis,

Your two questions are very related ...
ActiveCell.Row would give you the row number of the active cell
and
ActiveCell.Offset(1,0) does increment the row by 1 and the column by 0
....

HTH
Carim


--
Carim
------------------------------------------------------------------------
Carim's Profile: http://www.excelforum.com/member.php...o&userid=33259
View this thread: http://www.excelforum.com/showthread...hreadid=531295

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Incrementing row number

maybe something like this

Option Explicit
Dim rNum As Long
Sub next_row()
rNum = ActiveCell.Row + 1
Debug.Print rNum
End Sub

--


Gary


"den1s" wrote in message
oups.com...
Is there a command that simply increments the row number?

I know you can use the command cells(x,x) to select the specific cell
but I would like to increment the row number, without prior knowledge
of where I was.

Also is there a command that returns the current active cell?

- D



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Incrementing row number

Just to add to Carim's post
ActiveCell.offset(1,0).Select

selects the next cell down from the currently selected cell.

--
Regards,
Tom Ogilvy


"den1s" wrote in message
oups.com...
Is there a command that simply increments the row number?

I know you can use the command cells(x,x) to select the specific cell
but I would like to increment the row number, without prior knowledge
of where I was.

Also is there a command that returns the current active cell?

- D



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
incrementing sheet number iain_greenan Excel Discussion (Misc queries) 4 November 11th 08 04:29 PM
An incrementing serial number in each new document JLatham Excel Discussion (Misc queries) 0 March 28th 07 12:11 AM
Incrementing a formula by X number Bowbender Excel Worksheet Functions 3 September 21st 05 04:14 PM
Incrementing a worksheet number in a formula [email protected] Excel Worksheet Functions 1 July 15th 05 03:46 AM
cell incrementing by a specific number andrewsheldon98 Excel Programming 2 September 24th 03 07:37 PM


All times are GMT +1. The time now is 04:13 PM.

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"