Results 1 to 7 of 7

Getting macro to return input made into input box

Threaded View

  1. #1
    Registered User
    Join Date
    11-10-2011
    Location
    Tasmania, Australia
    MS-Off Ver
    Excel 2003
    Posts
    10

    Unhappy Getting macro to return input made into input box

    Hi i am very new to excel macros and i am very lost. I am trying to get a macro to calculate the sum of a number of cells and from that calculate an escalation based on the input made into an input box.. this is working fine but i need to get the macro to return the input made into the input box in the cell below with a percentage symbol. This i can't figure out.. This is what i've tried..

      Dim intEscRate As Integer
        intEscRate = InputBox("Enter an escalation percentage: ")
        ActiveCell.FormulaR1C1 = "=SUM(R[-4]C+R[-3]C+R[-2]C)"
        ActiveCell.Offset(1, 0).Range("A1").Select
        ActiveCell.FormulaR1C1 = "=R[-1]C*1." & intEscRate & ""
        ActiveCell.Offset(1, 0).Range("A1").Select
        ActiveCell.FormulaR1C1 = Val("intExcRate")
        ActiveCell.Offset(1, 0).Range("A1").Select
    It's the last two lines that aren't right. For example if i put 25 into the inpur box i need the macro to put 25% into the cell below the other two values.

    Can anyone help me please??
    Last edited by davesexcel; 11-10-2011 at 11:36 PM. Reason: Please use code tags when submitting code

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