Quantcast
Channel: Excel Macro Help
Viewing all articles
Browse latest Browse all 2

Excel Macro Help

$
0
0

you're using With for something  (dot missing), and you do not have to use any autofilling

With Sheets("Sheet2")
        Dim LastRow As Long
         LastRow = .Range("B" & .Rows.Count).End(xlUp).Row
        .Range("A2:A" & lastrow).FormulaR1C1 = "=RC[-2]*(-1)+RC[-1]"
 End With

[i do not analyze all code, but you use .Select/Selection many times. That means that you record your steps and after this do not correct those lines. If you'veWith you do not have to select nothing.


Oskar Shon, Office System MVP - www.VBATools.pl
if Helpful; Answer when a problem solved


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>