whatsinaname
MIS
We have an Excel 2003 spreadsheet with macros that we are trying to use in Excel 2007. Instead of the computed value being calculated for a range of cells, the cells are set to zero instead. I'm not too familiar with the macro, as I didn't write it.
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 8/1/01 by filippoun
'
' Keyboard Shortcut: Ctrl+e
' Keyboard Shortcut: Ctrl+e THIS MACRO IS FOR THE OBJECT AND FUND TABLE
'
Calculate
Application.Goto Reference:="Criteria"
Range("V41").Select
ActiveCell.FormulaR1C1 = "'Object"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'01"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object1"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'02"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object2"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'03"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object3"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'04"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object4"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'06"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object6"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'07"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object7"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'08"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object8"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'09"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object9"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'10"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object10"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'11"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object11"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'12"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object12"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'13"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object13"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'14"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object14"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V41").Select
ActiveCell.FormulaR1C1 = "'Fund"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'General Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="GFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'Special Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="SFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'Federal Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="FFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'Reimb. Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="RFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'Total Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="TFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="R1C1"
Calculate
End Sub
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 8/1/01 by filippoun
'
' Keyboard Shortcut: Ctrl+e
' Keyboard Shortcut: Ctrl+e THIS MACRO IS FOR THE OBJECT AND FUND TABLE
'
Calculate
Application.Goto Reference:="Criteria"
Range("V41").Select
ActiveCell.FormulaR1C1 = "'Object"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'01"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object1"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'02"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object2"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'03"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object3"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'04"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object4"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'06"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object6"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'07"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object7"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'08"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object8"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'09"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object9"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'10"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object10"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'11"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object11"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'12"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object12"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'13"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object13"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'14"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="Object14"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V41").Select
ActiveCell.FormulaR1C1 = "'Fund"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'General Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="GFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'Special Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="SFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'Federal Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="FFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'Reimb. Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="RFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="Criteria"
Range("V42").Select
ActiveCell.FormulaR1C1 = "'Total Funds"
Range("OutputA").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range _
("V41:V42"), CopyToRange:=Range("OutputB"), Unique:=False
Range("OUTPUT1").Select
Selection.Copy
Application.Goto Reference:="TFFunds"
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.Goto Reference:="R1C1"
Calculate
End Sub