+ Reply to Thread
Results 1 to 4 of 4

How to get specific "Text" value using IF condition with "Name Range"

  1. #1
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    How to get specific "Text" value using IF condition with "Name Range"

    Dear Forum,

    I want to use the "Name Range" as logical test to return the specific "Text" Value.

    For example:

    Name range 1 - "Fruits" is the name range, which includes Apple, Orange, Papaya, Grapes, Banana.
    Name range 2 - "Vegetable" is the name range, which includes Brinjal, Tomato, Potato, Onion.
    Name range 3 - "Flower" is the name range, which includes Rose, Jasmin, Lotus, Sunflower

    Requirement is, I want to have a return value in A1 as either "Fruit" or "Vegetable" or "Flower" based on the cell value in B1, which may have fruits or vegetable or flower name.

    How can i get the result in A1. Kindly help me.

    Thanks in advance

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: How to get specific "Text" value using IF condition with "Name Range"

    Try

    in B1

    =IFERROR(IF(MATCH(A1,Fruits,0),"Fruits"),IFERROR(IF(MATCH(A1,Vegetable,0),"Vegetable"),IFERROR(IF(MATCH(A1,Flower,0),"Flower"),"")))

  3. #3
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to get specific "Text" value using IF condition with "Name Range"

    Dear Mr. John,

    Thanks for your guidance, I will get back to soon with my testing observation and feed back.

    Regards

  4. #4
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to get specific "Text" value using IF condition with "Name Range"

    Dear Mr. John,

    Thanks for your formula, it works well.. I will add reputation soon, it shows, i can add reputation after spread reputation to some one else only. I will do it sure.

+ 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: 1
    Last Post: 08-15-2014, 06:00 AM
  2. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  3. [SOLVED] Range("A1") = Sheets("Sheet2").CenterHeader.Text doesnt work.
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2013, 07:06 AM
  4. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  5. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  6. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  7. use variable in Workbooks("book1").Worksheets("sheet1").Range("a1"
    By Luc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2005, 04:05 PM

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