+ Reply to Thread
Results 1 to 2 of 2

How to have Excel generate values based on my data

  1. #1
    Registered User
    Join Date
    03-12-2010
    Location
    CA
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to have Excel generate values based on my data

    Hello,
    I'm trying to do the following:
    In column A I enter data, in this case the number 4,5,6, or 7. There are values associated with each number that I would like to have excel populate in column B.

    Example.
    When I enter a 4 in column A I would like excel to automatically enter 100 in column B. When I enter a 5 in column A I would like excel to automatically enter 200 in column B.
    etc.

    Can someone walk me through this or link me somewhere where this is shown? I feel like it can be done fairly easily I'm just not even sure what to search for.

    Thanks, much appreciated.

  2. #2
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: How to have Excel generate values based on my data

    Jmenace,

    You could use a LOOKUP formula.

    Copy this formula into cell B1:
    =IF(ISNA(LOOKUP(A1,{4,5,6,7},{100,200,300,400})),"",LOOKUP(A1,{4,5,6,7},{100,200,300,400}))

    If you enter into cell A1, you will get in B1:
    A1 B1
    1 blank
    4 100
    5 200


    If you did not want to use a formula, you could use the Worksheet_Change Event that would fill into column B the correct value.

    Can we see your workbook?

    To attach your workbook, click on the New Post button, then scroll down and click on the Go Advanced button, then scroll down and click on the Manage Attachments button.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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