+ Reply to Thread
Results 1 to 4 of 4

Multiplying a cell number by a user input number

  1. #1
    Registered User
    Join Date
    07-05-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    11

    Multiplying a cell number by a user input number

    If you go to the fruits tab in this spreadsheet, you'll see two columns for 'change quantity' and 'change weight'.

    My initial idea for the quantity one was to click on, say, the 'Carbs' result for banana and do:

    C3=C3 (itself) x G3 but i learned about the whole self-referencing problem.

    As for the 'Change Weight' column, i'm thinking it would be best to use decimals like 1.0 for 100g and 1.5 for 150g. But again, need to figure out how to multiply all three results by that decimal figure.

    Help on both points would be great.

    Thanks.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-08-2008
    Posts
    39

    Re: Multiplying a cell number by a user input number

    There are two ways to do what you would like. Although I am still a noob myself I am trying to give something back to the forum by helping other noobs!

    You can string IF statements as shown in cell C5

    or you can just split column C and have two totals which may be usefull in any event. The first showing singular and the second showing multiple (much the same as you see on nutrition information labels)

    I have attached a sample for you to play with.

    Let me know how you go.

    Just to let you know you can only string 7 if statements so that may be too limiting...
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-08-2008
    Posts
    39

    Re: Multiplying a cell number by a user input number

    I have a better solution!

    You should use VLOOKUP - It will automatically return the number of carbs so you dont need to enter it. You can then have this multiplied by the amount of fruit.

    Below is a brief tutorial for you and I have attached an example spreadsheet.

    1. You will need to enter all the fruit you will need in column A of a sheet which you are not using.

    2. Enter the carbs which correspond to each fruit just to the right of them (you will see my example in the data tab)

    3. select both columns and type a memorable name in the little box which should show A1 i used the word 'Fruit' - then press enter.

    This had named the range as fruit so you can refer to that later and add anymore you need in the future.

    4. Now you need to go back and enter the formulae as i have in Sheet1 (obviously you will need to change the cell references) - this should be fairly self explanatory but please ask any questions you need to.

    Kind regards
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    07-05-2010
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Multiplying a cell number by a user input number

    Ok, i think i need to refine it a little because neither of those options is ideal.

    Reason being I need to give this to people to add to themselves and so it must be as simple as possible.

    I've updated the file to include just the one quantity change cell and the one weight change cell. They both act globally rather than having one for every single row. See attached.

    I think i'm going to have the user add their own little sum for every cell:

    e.g. for carbs in bananas: =27*G4 (where G4 is the quantity change cell)

    Thanks for the help though. Would be interested to hear your thoughts on this incase it could be made even more simple for the user.

    Cheers!
    Attached Files Attached Files

+ Reply to Thread

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