+ Reply to Thread
Results 1 to 3 of 3

Assigning a text value to another text value

Hybrid View

  1. #1
    Registered User
    Join Date
    02-07-2020
    Location
    Evesham
    MS-Off Ver
    2010
    Posts
    1

    Assigning a text value to another text value

    Hello,

    I'm trying to create a formula so that when a certain value in one column is present, I can automatically pull through another value - both values being text. I've used the =IF formula which works great, but I'm looking to do more than 64 values, so it's bringing up the nesting limit error. Is there another way to do this?

    For example, say I have the value 'Banana' in cell A2 and I want to assign the value 'Yellow' to it in cell B2. The IF formula I was using before discovering the nesting limit was:

    =IF(A2="Banana","Yellow",IF(A2="Strawberries","Red",IF(A2="Lime","Green")))

    I'm then dragging the formula down the B column to check all of the values in the A column and assign them the relevant value. Hopefully this makes sense.

    Thank you in advance for your help

    Ally

  2. #2
    Registered User
    Join Date
    06-24-2018
    Location
    India
    MS-Off Ver
    2016
    Posts
    45

    Re: Assigning a text value to another text value

    I've used helper columns in Columns B and C

    and used vlookup to get desired result

    See attachment for details

    Hope it helped you!!
    Attached Files Attached Files

  3. #3
    Forum Expert dosydos's Avatar
    Join Date
    12-09-2015
    Location
    MA, USA
    MS-Off Ver
    365(PC) V:2412
    Posts
    1,477

    Re: Assigning a text value to another text value

    sounds to me like you may want to utilize a a table, and then use a vlookup formula to find the value This way its easier to add values and you don't have to worry about making 100's of nesting If statements.
    for example in lets say G2 You put Banana. In H2 put Yellow.

    Then in B2 use the formula, =vlookup(A2,G:H,2,0)
    <----- If you are happy with your solution please click on the "* Add Reputation" as a way to say thank you.

+ 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. [SOLVED] Assigning Text Box Event through Class to required Text Box
    By Naveed Raza in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-18-2016, 05:54 AM
  2. Assigning Numbers to text
    By Archibald_SM in forum Excel General
    Replies: 4
    Last Post: 04-06-2011, 05:02 PM
  3. Assigning values to text
    By jbyk in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2010, 02:29 AM
  4. Assigning value to text
    By Zan03 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-05-2010, 05:04 PM
  5. Assigning a 0 value to text
    By Steele in forum Excel General
    Replies: 3
    Last Post: 10-07-2008, 09:56 AM
  6. Assigning values to text - but displaying the text!
    By hudds in forum Excel General
    Replies: 4
    Last Post: 03-24-2007, 06:03 AM
  7. Assigning a value to a text
    By Eugine in forum Excel General
    Replies: 1
    Last Post: 03-13-2006, 07:31 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