I import daily data into Excel for a morning report and the data does not always take up the same amount of rows. One day, it could go down to row 79 but the next day, it could go down to row 90. How can I modify the VBA below so that the code looks at all used rows instead of this static range?
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif] Selection.FormulaR1C1 = "=RIGHT(RC[-6],LEN(RC[-6])-FIND(""-"",RC[-6],1))"
Range("G2").Select
Selection.AutoFill Destination:=Range("G2:G79")
Range("G2:G79").Select
Selection.Copy[/FONT]
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif] Selection.FormulaR1C1 = "=RIGHT(RC[-6],LEN(RC[-6])-FIND(""-"",RC[-6],1))"
Range("G2").Select
Selection.AutoFill Destination:=Range("G2:G79")
Range("G2:G79").Select
Selection.Copy[/FONT]