MixedUpExcel
Board Regular
- Joined
- Apr 7, 2015
- Messages
- 222
- Office Version
- 365
- Platform
- Windows
Hi,
I'm having trouble running this section of code (recorded from a macro and then a variable string added as a cell reference)
The above code has just been placed in a module.
The last line is where I am being asked to debug.
My table is something similiar to this:
<tbody>
</tbody>
So what I need is to have a blank row inserted above all of the rows which say 'TOP ROW' in Column F.
The error message I am getting is:
Simon
I'm having trouble running this section of code (recorded from a macro and then a variable string added as a cell reference)
Code:
' FIND LAST ROW IN COLUMN A
With ActiveSheet
FINALlastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
' APPLY FILTER - HIDING ALL BLANKS IN COLUMN F
ActiveSheet.Range("$A$1:$F$" & FINALlastrow).AutoFilter Field:=6, Criteria1:="<>"
Rows("2:" & FINALlastrow).Select
' INSERT A BLANK ROW ABOVE EACH VISIBLE ROW
Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
The above code has just been placed in a module.
The last line is where I am being asked to debug.
My table is something similiar to this:
Item Code | Description | Item 2 | Desc 2 | Qty | Top Row |
IC123 | DES123 | IC 234 | DESC234 | 1 | TOP ROW |
IC123 | DES123 | IC 546 | DESC546 | 2 | |
IC123 | DES123 | IC 873 | DESC873 | 1 | |
IC543 | DES543 | IC 195 | DESC195 | 3 | TOP ROW |
IC543 | DES543 | IC 749 | DESC749 | 1 | |
IC943 | DES943 | IC 954 | DESC954 | 2 | TOP ROW |
IC943 | DES943 | IC 864 | DESC864 | 1 | |
IC943 | DES943 | IC 753 | DESC753 | 4 | |
IC943 | DES943 | IC 951 | DESC951 | 2 |
<tbody>
</tbody>
So what I need is to have a blank row inserted above all of the rows which say 'TOP ROW' in Column F.
The error message I am getting is:
Thanks for any help with this.Run-time error '438':
Object doesn't support this property or method
Simon
Last edited: