Sub Import_IAS() ' ' Import_IAS Macro ' Beta testing importing IAS data from Safari print preview from IAS 4.8.8.0 - BRad ' with a few mods by Pete Erskine ' Variable Declaration Dim lastrow As Range ' Variable for finding what row the first line of the footer is in Dim last As Integer ' Variable for holding the row of variable lastrow Dim i As Integer ' Variable for empty TV cells loop Dim firstrow As Range ' Vairbale for finding the first row of frequencies Dim first As Integer ' variable for holding the row of variable firstrow Dim freq As Integer 'Variable to find what Column Freqs are in Dim freqcol As Range ' Column for freqs Application.ScreenUpdating = False ' clear all Cells.Select Selection.Clear ' Pasting clipboard Range("A1").Select ActiveSheet.Paste ' Finds and sets the variables for the first line of the footer Set lastrow = ActiveSheet.Cells.Find("Items printed*") last = lastrow.Row ' Finds and sets the variables for the first frequency line Set firstrow = ActiveSheet.Cells.Find("sorted by*") first = firstrow.Row ' Finds frequency column Set freqcol = ActiveSheet.Cells.Find("Zone*") freq = freqcol.Column - 2 ' Removes footer ActiveSheet.Range(Rows(last), Rows(last + 20)).Select Selection.Delete ' Removes header and leaves Show Name & No of Freq (for confirmation) ActiveSheet.Range(Rows(1), Rows(first)).Select Selection.Delete Range(Cells(1, freq), Cells(last, freq)).Select ' Selects the freq list and formats it a little Range(Cells(1, freq), Cells(last, freq)).NumberFormat = "0.000" Range(Cells(1, 1), Cells(last, 8)).Select With Selection .VerticalAlignment = xlCenter .WrapText = False .Orientation = 0 .AddIndent = False .ShrinkToFit = False .ReadingOrder = xlContext .MergeCells = False End With With Selection.Font .Name = "Times New Roman" .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = xlAutomatic End With Selection.Columns.AutoFit ' Sort by name column Range(Cells(2, 1), Cells(last, 8)).Select Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Key2:=Range("F2") _ , Order2:=xlAscending, Key3:=Range("C2"), Order3:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _ xlSortNormal Range("A1").Select Application.ScreenUpdating = True End Sub