+ Reply to Thread
Results 1 to 8 of 8

User input Auto multiplies by constant

  1. #1
    Registered User
    Join Date
    08-24-2009
    Location
    Chicago, US
    MS-Off Ver
    Excel 2003
    Posts
    9

    User input Auto multiplies by constant

    Hi,
    Heres the situation that I have been hitting my head on. I need to create three columns that if a user inputs a number, it automatically multiplies by that number by a cell reference. So if a user types in 3 in column A Row 3, it automatically mutiplies that number by cell reference $A$2.
    Thanks for the help!
    -Vik

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: User input Auto multiplies by constant

    So if a user types in 3 in column A Row 3, it automatically mutiplies that number by cell reference $A$2.
    You cannot type a number into a cell and at the same time multiply it by a number in another cell without using VBA or having a formula cell that uses two input cells.

    Perhaps you meant: multiply $A$2 by a number entered into A3? If so, then
    the results cell uses this formula: = $A$2*A3

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: User input Auto multiplies by constant

    This code will work on Columns B,C,D
    Please Login or Register  to view this content.
    Copy the code
    Select the worksheet in which you want the code to run
    Right click on the sheet tab and choose View Code, to open the Visual Basic Editor.
    Where the cursor is flashing, choose Edit | Paste
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    08-24-2009
    Location
    Chicago, US
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: User input Auto multiplies by constant

    I tried that code and followed your instructions to the letter, but it came back with a run time error 424.

    Option Explicit
    Please Login or Register  to view this content.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: User input Auto multiplies by constant

    Attach the workbook with the code in

  6. #6
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: User input Auto multiplies by constant

    vikhound,

    Obviously, disregard my post. For some reason, I must have thought I was in the General section of the forum.

    Clearly, you intended to get a VBA solution.

  7. #7
    Registered User
    Join Date
    08-24-2009
    Location
    Chicago, US
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: User input Auto multiplies by constant

    Ok so I attached the file to this forum reply. Just to resummarize;
    In this file I need to create reference cells with fixed values into C2, D2, and E2 respectively. Then I want the user to be able to enter values into the corresponding columns (C5, D5, or E5 onwards) and have it automatically multiply by C2, D2, or E2. So if a user wants to edit the RAD ingredient in product C, all they do is input a number into the corresponding column C and it automatically multiplies by the value in C2. Also, Can you tell me how to increase the number of columns in case new ingredients need to be added?
    Thanks alot for taking trouble,
    Vik
    Attached Files Attached Files

  8. #8
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: User input Auto multiplies by constant

    I think this will do as you want
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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