There are literally hundreds of posts on this forum that have to do with last row, I've run a few of the solutions and for some reason or another I just get error after error.
Many of the macros/steps in my workbook are set to a specific point (highlighted below) because I have no idea how to run a "last row" procedure that will actually work. I've been able to learn a great deal about VBA through this macro building process and this last row variable is putting a hitch in my giddy-up.
i.e. when filtering the final data, it shows rows that don't matter because I've run the code to a specific spot (highlighted below). This doesn't make sense to do and I've been avoiding it until now...
Could an expert please help me through a couple of my coding problems and work through a few solutions?
Problem #1:
Need to fill down results to last row. Actual last row in the particular report will vary, but currently last row = 1947
Many of the macros/steps in my workbook are set to a specific point (highlighted below) because I have no idea how to run a "last row" procedure that will actually work. I've been able to learn a great deal about VBA through this macro building process and this last row variable is putting a hitch in my giddy-up.
i.e. when filtering the final data, it shows rows that don't matter because I've run the code to a specific spot (highlighted below). This doesn't make sense to do and I've been avoiding it until now...
Could an expert please help me through a couple of my coding problems and work through a few solutions?
Problem #1:
Need to fill down results to last row. Actual last row in the particular report will vary, but currently last row = 1947
Code:
ActiveWorkbook.Sheets("HazShipper").Select
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Range("Z2").Value = "=LEFT(TRIM(CLEAN(Q2)),3)"
Range("AA2").Value = "=TRIM(CLEAN(K2))"
Range("AB2").Value = "=IFNA(VLOOKUP(Z2,AirportCodes!$A$2:$C$2000,2,0),""No Departure"")"
Range("AC2").Value = "=IF(LEFT(K2,4)=LEFT(AB2,4),True,False)"
Range("Z2:AC2").Select
Selection.AutoFill Destination:=Range("Z2:AC[COLOR=#ff0000][B]25000[/B][/COLOR]")
Last edited: