+ Reply to Thread
Results 1 to 2 of 2

Multiple Variables in a single column

  1. #1
    Registered User
    Join Date
    05-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    3

    Multiple Variables in a single column

    What I would like to do is to set up a column where I can input a number 1 to 4 and it will assign the number a value, such as 1 = 20, 2 =25, 3 = 30, 4= 35. I would like to be able to do this all in one column. I have not used excel very long and I am having a difficult time doing this. I took basic programming so I understand some terminology with this stuff, such as if statements. I also already know how to add, multiply, subtract, and divide, if any of those functions are necessary to get the column to do this. Thank You.
    Last edited by ExcelHelp813; 05-23-2012 at 02:25 PM.

  2. #2
    Forum Expert ben_hensel's Avatar
    Join Date
    01-26-2012
    Location
    Northeast USA
    MS-Off Ver
    Office 365
    Posts
    2,043

    Re: Multiple Variables in a single column

    If you have input in column A, where you enter the number, and output in column B, where it spits out the value corresponding to the input, then I think the best way to do it would be to build a table in C and D with the correspondence, and then use VLOOKUP to go from the value in A to the table in C&D to the output in B. This will allow a lot of flexibility and it will be pretty clear what's going on.

    Or, in a completely different direction, rather than bothering with a table, an algebraic function; B1 = A1 * 5 + 15 would deliver the output matching that input. You might wrap a logical check around it with something like =IF ( AND(condition 1, 2, etc) , "if good", "if bad") or something.

    But, if you want to type something into cell A, and then excel changes what's in cell A to match some other value... that would require programming a macro, you can't do it with just functions or formatting. It's my opinion, but I don't think doing so would be a good idea, either.

+ 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