+ Reply to Thread
Results 1 to 3 of 3

Can Excel populate a cell with text when another cell is filled with a specific text?

  1. #1
    Registered User
    Join Date
    04-03-2024
    Location
    USA
    MS-Off Ver
    365
    Posts
    1

    Can Excel populate a cell with text when another cell is filled with a specific text?

    Hi!

    I am trying to see if Excel is able to populate a cell with a text given that another cell has one of a predetermined list of texts put into it. For example, when "blue" is typed in one cell, the cell next to it will give "sky". I have a few hundred of these combinations (ie: red - apple, yellow - banana, etc) so I would like to avoid a really long IF THAN statement function if I can. Is Excel able to do something like this? Thanks!

    Thank you everyone for your swift responses and help!
    Last edited by ShiroraTsukari; 04-04-2024 at 01:22 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,765

    Re: Can Excel populate a cell with text when another cell is filled with a specific text?

    Yes, Excel can do this. You would put your combinations in a 2-column table somewhere and then you would be able to use a lookup function (VLOOKUP or XLOOKUP) or an INDEX/MATCH combination to extract the appropriate "description" from a given "colour".

    Attach a sample Excel workbook, as described in the yellow banner at the top of the screen.

    Hope this helps.

    Pete

  3. #3
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,015

    Re: Can Excel populate a cell with text when another cell is filled with a specific text?

    This example uses Sheet1, Col A as your location for populating cells whose term will be searched. Example: Sheet1 / A1 the user will enter the term "blue" (see image 1).
    On Sheet2 in Cols A & B are listed the primary term and the matching term for each (see image 2).

    This example utilizes a formula that performs a "VLOOKUP" of Sheet2 to return the matching term (see image 2).

    Refer to attached example workbook ...

    IMAGE 1

    Sheet1.jpg


    IMAGE 2

    Sheet2.jpg

    The formula should be pasted into Sheet1 / B1, then copied down Col B as far as necessary for future entries in Col A :
    =IF(A1="","",(VLOOKUP(A1,Sheet2!$A$1:$B$3,2,FALSE)))
    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)

Similar Threads

  1. Replies: 2
    Last Post: 03-14-2023, 04:05 PM
  2. [SOLVED] Populate a cell with specific text based on another cell value
    By chriswrcg in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2020, 12:23 PM
  3. Looking to auto populate a table based on specific cell text
    By ghansonp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-05-2016, 04:29 PM
  4. [SOLVED] trying to populate the first blank cell in a row with a specific text value
    By Rob69mfj in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2014, 01:01 PM
  5. Replies: 7
    Last Post: 01-04-2014, 10:11 PM
  6. Function to populate cell with specific text from an external txt file
    By exoscoriae in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-02-2013, 07:34 AM

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