Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
setting default filter setting | Charts and Charting in Excel | |||
PrintQuality setting - is -3 a valid setting? | Excel Programming | |||
Setting default pivot table field setting to "sum" | Excel Discussion (Misc queries) | |||
VBA Setting .Value to a date does not respect local system setting | Excel Programming | |||
Sending email via macro- setting the importance setting. | Excel Programming |