Thursday 15 May 2014

excel - Runtime error 1004 on autofilling data -


Text after "div class =" itemprop = "text">

My code is considered to be formatting the formula in my "IF" 2 = J2 and so on in column "L" , But the runtime error is facing 1004.

I want the macro to complete the entire column until the column in the column hits the last line.

code:

  sub siteaccess () in as dim mySheet worksheet, myOtherSheet worksheet, Mybook workbook set mybook = Excel.ActiveWorkbook set mySheet = myBook.Sheets ( "SiteAccessReports") set myOtherSheet = myBook.Sheets (Long as FF dim as "Sheet1") FF = myOtherSheet.Range ( "L 2: L". & amp; myOtherSheet.Cells (myOtherSheet.Rows.Count , "L") and (xlUp) .Row with Sheet ("Sheet1") .Range ("L2 .ount") .formula = "= IF (RC [-2] = RC [-1] , "" "", "" Yes "") "Selection.AutoFill Destination: = Range (" L2: L "& FF), Type: = Interval sub    

me Sure that there is a better answer to end the error line with end = xlFillDefault but for any other yet:

  sub siteaccess () dim mybook workbook dim myOtherSheet Worksheet FF Long set in as dim mybook = Excel.ActiveWorkbook set as myOtherSheet = myBook.Sheets ( "Sheet1") FF = myOtherSheet.Range ( "the 1:" & Amp; MyOtherSheet.Cells (myOtherSheet.Rows.Count, "K") _ .End (xlUp) .row Sheet ("Sheet1") .Range ("L2"). Select .CountRange ("L2"). Formula = "= IF (RC [-2] = RC [-1]," "No" "," "Yes" ")" Selection AutoFill Destination: = Category ("L2: L" and FF), Type: = End with XlFillDefault End End    

No comments:

Post a Comment