+ Reply to Thread
Results 1 to 2 of 2

IF Macro, insert text

  1. #1
    Registered User
    Join Date
    03-28-2007
    Posts
    25

    IF Macro, insert text

    I would like to create a macro that changes a content of a cell depending on the value inserted.

    For example:

    If the value '0570651' is entered into cell A1, I would like cell A2 to contain the text '300mm internal diameter concrete strength Class M..."

    If the value '0570652' is entered into cell A1, I would like cell A2 to contain the text '300mm internal diameter concrete strength Class P..."

    There are numerous values and descriptions, can anyone help?

    Thanks in advance.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by jamessaunders
    I would like to create a macro that changes a content of a cell depending on the value inserted.

    For example:

    If the value '0570651' is entered into cell A1, I would like cell A2 to contain the text '300mm internal diameter concrete strength Class M..."

    If the value '0570652' is entered into cell A1, I would like cell A2 to contain the text '300mm internal diameter concrete strength Class P..."

    There are numerous values and descriptions, can anyone help?

    Thanks in advance.
    HI,

    On Sheet2 setup in column A the items and in column B their corresponding values

    then in Sheet1, in A2 put

    =VLookup(A1,Sheet2!A:B,2,False)

    It is normal to do this across a row (A1 B1 etc) rather than down a column (A1 A2 etc) but its your choice.

    hth
    ---
    Si fractum non sit, noli id reficere.

+ 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