Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default How do I get the row number?

Hi,
The code snippet below will copy data from a certain row plus other info to
a different sheet.
I would like it to include the row number (at the end) of the row copied
from for ease of identification in the future. Any ideas welcomed.

.Range("B" & lngNewRow).Value = Sheets("claims").Range("D" & lngRowNo)
.Range("C" & lngNewRow).Value = Sheets("claims").Range("E" & lngRowNo)
.Range("H" & lngNewRow).Value = UserForm8.TextBox1.Text
.Range("I" & lngNewRow).Value = UserName()
.Range("J" & lngNewRow).Value = Format(Date, "dd mmm")
.Range("K" & lngNewRow).Value = Format(Time, "hh:mm")
.Range("L" & lngNewRow).Value = rownumber()

Thanks
--
Traa Dy Liooar

Jock
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default How do I get the row number?

Jock,

Isn't it lngRowNo you want

..Range("L" & lngNewRow).Value = lngRowNo


Mike

"Jock" wrote:

Hi,
The code snippet below will copy data from a certain row plus other info to
a different sheet.
I would like it to include the row number (at the end) of the row copied
from for ease of identification in the future. Any ideas welcomed.

.Range("B" & lngNewRow).Value = Sheets("claims").Range("D" & lngRowNo)
.Range("C" & lngNewRow).Value = Sheets("claims").Range("E" & lngRowNo)
.Range("H" & lngNewRow).Value = UserForm8.TextBox1.Text
.Range("I" & lngNewRow).Value = UserName()
.Range("J" & lngNewRow).Value = Format(Date, "dd mmm")
.Range("K" & lngNewRow).Value = Format(Time, "hh:mm")
.Range("L" & lngNewRow).Value = rownumber()

Thanks
--
Traa Dy Liooar

Jock

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
Sumif number is greater than a number but less than another number lulu151 Excel Discussion (Misc queries) 2 May 7th 10 07:12 PM
How can I click on a telephone number in an Excel 2002 spreadsheet, and have the number dialed? jbclem Excel Discussion (Misc queries) 2 August 13th 09 01:57 AM
Inserting a number of rows based on the number of columns filled bytext values zorakramone Excel Programming 4 August 3rd 09 08:21 AM
How to calculate number of occurencies of a specific number number Stefan Excel Discussion (Misc queries) 4 September 8th 08 08:33 AM
find an exact number in a different sheet and use the cell containing the number to output information [email protected] Excel Programming 4 February 18th 07 08:59 PM


All times are GMT +1. The time now is 10:38 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"