Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Is there a formula in excel that allows you to assign a value to a variable?

For example, if the variables are A, B, C, and D, is it possible to let A equal 4, and B equal 3, etc. so that when you type in that variable, it has a value.

6 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    You can name a cell. Put the values into some cells and then look under tools, or maybe right click on a cell. I don't have Excel right here otherwise I'd check for you.

    You can always use the help and search for 'naming'.

  • 1 decade ago

    In Excel, the best way to do this is to put the values into cells and use the cell references in the formula. For instance, you could put A into cell A1, B into cell A2, C into cell A3 and D into cell A4. Then to evaluate, say, B+A-4CD, you'd enter into another cell the formula:

    = A2 + A1 - 4 * A3 * A4

  • 1 decade ago

    your problem can be better solved by not using formulas in excel. Instead use 'macros' in the excel sheet to use these kind of assigned variable values.

  • 1 decade ago

    if input data into a cell that has a formula it will replace the formula.

    if the cell is part of a formula, it works but then that input is permanent until you type something else in its place.

    your formula has to call variables from cell location on the spreadsheet where you input the data.

  • How do you think about the answers? You can sign in to vote the answer.
  • 1 decade ago

    Naming is the right answer, but it would be even cleaner to use named constants and avoid needing to type data in a cell.

    http://www.ozgrid.com/Excel/named-constants.htm

  • Anonymous
    1 decade ago

    well you couldjust let cells be ur A,B,C,D

    e.g. click on A1 and type 4

    click on b2 and type 5

    Then if u want to use these as variables click on say c1 and type " = A1*B2 " and it will multiply these cells using them as variables as in conclusion in this case A = A1

Still have questions? Get your answers by asking now.