View Single Post
 
Old 07-25-2018, 09:16 AM
kevinbradley57 kevinbradley57 is offline Windows 7 64bit Office 2010 64bit
Advanced Beginner
 
Join Date: Jul 2017
Posts: 89
kevinbradley57 is on a distinguished road
Default

Thanks, NoSparks. The first double quotes were slanted -- no idea how I did that. However, now I get this run-time error: Method 'Range' of object' _Global' failed.

Here's the code:

Code:
Sub Difference()
Lastrow = Range("H" & Rows.Count).End(xlUp).Row
Range("H2").FormulaR1C1 = "RC[-2]-RC[-3]"
Range("H2").AutoFill Destination:=Range("H2:H") & Lastrow
ActiveSheet.AutoFilterMode = False
Application.ScreenUpdating = True
End Sub
Reply With Quote