Hi,
how do i make a buttons ask for the user to input the data and the values is insert to the macro to run the calculation.
Here is my codes:
ActiveCell.FormulaR1C1 = "12"
Selection.AutoFill Destination:=Range("C3:C11"), Type:=xlFillDefault
here i want the user to enter 12 so it will fill in cell C3:C11 automatically...
and this one, i want the user to enter 1.56 it will then set .GoalSeek Goal: from range H3 to H11 to the value 1.56 so i can run the macro.
Range("H3").Select
Range("H3").GoalSeek Goal:=1.56, ChangingCell:=Range("E3")
Range("H4").Select
Range("H4").GoalSeek Goal:=1.56, ChangingCell:=Range("E4")Range("H5").Select
Range("H5").GoalSeek Goal:=1.56, ChangingCell:=Range("E5")
Range("H6").Select
Range("H6").GoalSeek Goal:=1.56, ChangingCell:=Range("E6")
Range("H7").Select
Range("H7").GoalSeek Goal:=1.56, ChangingCell:=Range("E7")
Range("H8").Select
Range("H8").GoalSeek Goal:=1.56, ChangingCell:=Range("E8")
Range("H9").Select
Range("H9").GoalSeek Goal:=1.56, ChangingCell:=Range("E9")
Range("H10").Select
Range("H10").GoalSeek Goal:=1.56, ChangingCell:=Rang("E10")
Range("H11").SelectRange("H11").GoalSeek Goal:=1.56,ChangingCell:=Range("E11")
Any help or suggestion is much appreciated guys.
how do i make a buttons ask for the user to input the data and the values is insert to the macro to run the calculation.
Here is my codes:
ActiveCell.FormulaR1C1 = "12"
Selection.AutoFill Destination:=Range("C3:C11"), Type:=xlFillDefault
here i want the user to enter 12 so it will fill in cell C3:C11 automatically...
and this one, i want the user to enter 1.56 it will then set .GoalSeek Goal: from range H3 to H11 to the value 1.56 so i can run the macro.
Range("H3").Select
Range("H3").GoalSeek Goal:=1.56, ChangingCell:=Range("E3")
Range("H4").Select
Range("H4").GoalSeek Goal:=1.56, ChangingCell:=Range("E4")Range("H5").Select
Range("H5").GoalSeek Goal:=1.56, ChangingCell:=Range("E5")
Range("H6").Select
Range("H6").GoalSeek Goal:=1.56, ChangingCell:=Range("E6")
Range("H7").Select
Range("H7").GoalSeek Goal:=1.56, ChangingCell:=Range("E7")
Range("H8").Select
Range("H8").GoalSeek Goal:=1.56, ChangingCell:=Range("E8")
Range("H9").Select
Range("H9").GoalSeek Goal:=1.56, ChangingCell:=Range("E9")
Range("H10").Select
Range("H10").GoalSeek Goal:=1.56, ChangingCell:=Rang("E10")
Range("H11").SelectRange("H11").GoalSeek Goal:=1.56,ChangingCell:=Range("E11")
Any help or suggestion is much appreciated guys.