Results 1 to 1 of 1

Help!Run-time error'1004': Formula is not complete. Make sure an Ending Square bracket ]..

Threaded View

  1. #1
    Registered User
    Join Date
    05-16-2013
    Location
    SG
    MS-Off Ver
    Excel 2007
    Posts
    15

    Help!Run-time error'1004': Formula is not complete. Make sure an Ending Square bracket ]..

    Hi guys,

    Appreciate your help. Trying to run this macro. but Runtime error 1004. Formula is not complete. Make sure an ending square bracket ] is not missing. message popped up. How should i go about solving this.

    Sheets("TOJ-Pivot").Select
    ActiveSheet.PivotTables("PivotTable1").PivotSelect "'Service Order'[All]", _
    xlLabelOnly, True

    Selection.Copy
    Sheets("Single Currency").Select
    Range("D20").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Sheets("Single Currency").Select
    Range("D20").Select
    Range(Selection, Selection.End(xlDown)).Select
    Range(Selection, Selection.End(xlDown)).Select
    With Selection.Interior
    .Pattern = xlNone
    .TintAndShade = 0
    .PatternTintAndShade = 0
    End With
    Range("F20").Select
    ActiveCell.FormulaR1C1 = "=IFERROR(VLOOKUP(RC4,'TOJ-Pivot'!C2:C4,3,0),0)"
    Range("F20").Select
    Selection.Copy
    Range(Selection, Selection.End(xlDown)).Select
    Range("F20:F834").Select
    ActiveSheet.Paste
    Range("E20").Select
    Application.CutCopyMode = False
    ActiveCell.FormulaR1C1 = "=IF(RC[1]>0,""DR"",""CR"")"
    Range("E20").Select
    Selection.Copy
    Range("E20:E21").Select
    Range(Selection, Selection.End(xlDown)).Select
    Range("E20:E834").Select
    ActiveSheet.Paste
    Range("D22").Select

    Sheets("Single Currency").Select
    Range("E19").Select
    Application.CutCopyMode = False
    ActiveWorkbook.Worksheets("Single Currency").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Single Currency").Sort.SortFields.Add Key:=Range( _
    "F20:F835"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
    xlSortNormal
    With ActiveWorkbook.Worksheets("Single Currency").Sort
    .SetRange Range("A19:H835")
    .Header = xlYes
    .MatchCase = False
    .Orientation = xlTopToBottom
    .SortMethod = xlPinYin
    .Apply
    End With
    End Sub
    Last edited by kelkelkel08; 06-04-2013 at 10:33 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1