Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Deleting several cells at once causes a VBA error

Hi
Cell.Row

will give you the absolute row number

Range.Row

will give you the row number of the first cell in range
eg Range("G12:G511").row is 12

Range("G12:G511").Cells(3,1).Row will give you the absolute row number
of Cells(3,1) in Range
eg Range("G12:G511").Cells(3,1).Row is 14

If you want the row number relative to the first row in the Range use,
for example,
Range("G12:G511").Cells(3,1).Row -Range("G12:G511").Row + 1

which is 14 - 12 + 1 = 3

Highlight Row in the VBE and hit F1 to see the type etc of Row

regards
Paul

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
Error Deleting Columns Gk Excel Discussion (Misc queries) 4 August 20th 09 09:44 PM
Deleting Worksheet Error James McDowell[_2_] Excel Programming 3 July 20th 05 10:53 PM
Error when deleting sheets John Excel Programming 5 July 7th 05 07:27 PM
error runtime 9: deleting a worksheet [email protected] Excel Programming 4 April 7th 05 04:42 PM
Deleting Hyphens or Dashes from multiple cells without deleting the remaining content rmaloy Excel Programming 5 February 9th 04 01:59 AM


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