Nicholas Agius
New Member
- Joined
- Apr 13, 2014
- Messages
- 9
I would like to change the greater than number to the value in cell 'I11' in sheet 'Linear Programming Data' and the less than number to the value in cell 'I12' in sheet 'Linear Programming Data'. The code I am using was done by recording a macro since I don't know how to code in vba.
Please Help me its very urgent and i need to finalize this work. if I don't find a solution for this i will be .........
Code:
Sub Results2()
' Results2 Macro
' copy table filter power by greater than and less than
Sheets("Finalizing Results 2").Select
Cells.Select
Selection.ClearContents
Range("A1").Select
Sheets("Finalizing Results 1").Select
Range("Table33").Select
Selection.Copy
Sheets("Finalizing Results 2").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "Fuel"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Power"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Weight"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Area"
Range("A1:D10050").Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$D$10050"), , xlYes).Name _
= "Table34"
Range("Table34[#All]").Select
ActiveSheet.ListObjects("Table34").TableStyle = "TableStyleMedium15"
Range("E3").Select
ActiveSheet.ListObjects("Table34").Range.AutoFilter Field:=2, Criteria1:= _
">=122.6", Operator:=xlAnd, Criteria2:="<=132.6" 'I need to change the greater than number to the value in cell 'I11' in sheet 'Linear Programming Data' and the less than number to the value in cell 'I12' in sheet 'Linear Programming Data'.
Range("E20").Select
End Sub
Please Help me its very urgent and i need to finalize this work. if I don't find a solution for this i will be .........