USD 15 Multiply column by number based on input

  • Hello,


    I need to have an input box or userform come up that prompts the user for a number that will be used as a multiplier. I then need that inputted number to be multiplied by whatever value is already populated in every cell in column I. The results are to be overwritten in those cells in that column. I'm certain I have made this sound more complicated than need be, but I've attached a worksheet that is representative of the data I will be working with.


    In the attached, the Return Interest column (I) is what will need to be adjusted on occasion. There will always be a header and the number of rows will vary from day to day. So to reiterate, I need some sort of pop up box to ask for a multiplier, if the user puts 3, then each amount in column I will be multiplied by three and the result will overwrite what is currently populated.


    Thanks a bunch for taking a look.


    Paid 10% to Ozgrid Transaction ID 64T99994T5175930P


    JL

  • I'll look at this now for you JL


    Ger

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Let me know if this works for you:


    [vba]
    Sub Multiplier()


    Dim dblAnswer As Double
    Dim rng As Range
    Dim rTemp As Range


    Application.ScreenUpdating = False
    On Error Resume Next
    Set rng = Worksheets("Page1_1").UsedRange.Columns("I").SpecialCells(xlCellTypeConstants, xlNumbers)
    If Not rng Is Nothing Then
    dblAnswer = CDbl(InputBox("Enter Multiplier for Column I", "Multiplier", 1))
    If dblAnswer <> 0 Then
    Set rTemp = Worksheets("Page1_1").UsedRange.SpecialCells(xlLastCell).Offset(1, 1)
    rTemp = dblAnswer
    rTemp.Copy
    rng.PasteSpecial xlPasteValues, xlPasteSpecialOperationMultiply
    rTemp = ""
    Application.CutCopyMode = False
    End If
    Else
    MsgBox "No numbers cells found in Column I"
    End If
    On Error GoTo 0


    Application.ScreenUpdating = True


    End Sub
    [/vba]

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

  • Payment Received...:cheers:


    :thanx:

    _______________________________________________
    There are 10 types of people in the world. Those that understand Binary and those that dont. :P


    Why are Halloween and Christmas the same? Because Oct 31 = Dec 25... ;)

    _______________________________________________

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!