Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Setting Last Row

HI.

I am running a fill down macro and am needing some assistance....

How do I word the macro so that it goes down to a particular row?
(instead of searching a range or column).

I.e. - I need one of these to say the last row is always 500.



Set LastRow = Sheet1.Range("a65536").End(xlUp)
or
LastRow = Range("a65536:hc65536").End(xlUp).Row



Thanx

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Setting Last Row

On Aug 6, 1:57 pm, "J.W. Aldridge"
wrote:
HI.

I am running a fill down macro and am needing some assistance....

How do I word the macro so that it goes down to a particular row?
(instead of searching a range or column).

I.e. - I need one of these to say the last row is always 500.

Set LastRow = Sheet1.Range("a65536").End(xlUp)
or
LastRow = Range("a65536:hc65536").End(xlUp).Row

Thanx


Set LastRow = Sheet1.Range("a500:hc500").End(xlUp)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Setting Last Row

Kinda confused. You just want the last row to always be 500? The
just substitute "500" for wherever you are using the LastRow
variable. Now, I could be completely misunderstanding your
perdicament.

J.W. Aldridge wrote:
HI.

I am running a fill down macro and am needing some assistance....

How do I word the macro so that it goes down to a particular row?
(instead of searching a range or column).

I.e. - I need one of these to say the last row is always 500.



Set LastRow = Sheet1.Range("a65536").End(xlUp)
or
LastRow = Range("a65536:hc65536").End(xlUp).Row



Thanx


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default Setting Last Row


Sounds simple but, not working when i change.
Here's the actual formula.
(I have info all the way from column A to HC, and this formula is
stopping wherever the data in column A is stopping).


Sub FillColBlanks_all()


Dim wks As Worksheet
Dim rng As Range
Dim LastRow As Long


Set wks = ActiveSheet


With wks

LastRow = Range("a500:hc500").End(xlUp).Row


Set rng = Nothing
On Error Resume Next
Set rng = .Range("A11:hc" &
LastRow).Cells.SpecialCells(xlCellTypeBlanks)
On Error GoTo 0


If rng Is Nothing Then
MsgBox "No blanks found"
Exit Sub
Else
rng.FormulaR1C1 = "=R[-1]C"
End If


End With


End Sub


thanx

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
setting default filter setting tpeter Charts and Charting in Excel 0 December 4th 09 02:50 PM
PrintQuality setting - is -3 a valid setting? Bill G[_4_] Excel Programming 3 October 5th 06 03:43 AM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM
VBA Setting .Value to a date does not respect local system setting Frank_Hamersley Excel Programming 13 July 18th 04 02:51 PM
Sending email via macro- setting the importance setting. Julian Milano[_2_] Excel Programming 1 January 20th 04 10:15 PM


All times are GMT +1. The time now is 09:48 PM.

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"