LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default returning max UsedRange row number

I have created a macro which fills in the blank entries of
columnA much like using f5-special-blanks uparrow & ctrl-
enter.

The code I have works. But I did it by cheating a bit. My
data will be variable size from instance to instance, so
what I did was find the bottom of my data with
ActiveCell.End(xlDown)in columnB and then looked for
blanks in columnA and columnB. I know there will be no
blanks in B so the result is the blanks in A will be
filled in.

My question is, how would I do it without the cheating? I
want a range from A2 to the last row in A but I'm not sure
how to reference that.

Also, the UsedRange property may be inaccurate since the
sheet is created by copying another sheet.

Code snippet follows.

Range("B2").Select
Range("A2", ActiveCell.End(xlDown)).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"

Thanks in advance
Drabbacs



 
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
Searching and returning row number of a value MikeDH Excel Worksheet Functions 1 August 9th 05 06:06 PM
UsedRange problem Kobayashi[_26_] Excel Programming 4 January 30th 04 05:17 PM
finding last row number of UsedRange Jamie Martin[_2_] Excel Programming 4 September 26th 03 06:13 PM
UsedRange problem Andy Excel Programming 2 September 18th 03 05:17 PM
Usedrange Terry VanDuzee Excel Programming 6 August 10th 03 05:57 PM


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