+ Reply to Thread
Results 1 to 6 of 6

A cell should return a value by reading a string name

  1. #1
    Registered User
    Join Date
    01-08-2016
    Location
    bangalore India
    MS-Off Ver
    97-2003
    Posts
    12

    A cell should return a value by reading a string name

    Dear All,

    Please find below problem description,

    if A1 cell a contains "BFH" string, it should return last 20 characters of A1 in cell D1
    if cell A1 contains BFH string , Cell E1 should return first 12 strings of B3
    If cell A1 contains BFH string, Cell E1 should return value of B4

    Kindly suggest me the solution

    Regards

    Vishwa

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: A cell should return a value by reading a string name

    d1=iferror(search("BFH",A1,1)>0,right(A1,10),""))

    The other questions (cell E1) is the same logic.
    Last edited by oeldere; 04-18-2016 at 03:30 AM. Reason: iferror added
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    01-08-2016
    Location
    bangalore India
    MS-Off Ver
    97-2003
    Posts
    12

    Re: A cell should return a value by reading a string name

    Hello Oeledere,

    Thank you for the formula, but I am getting error msg "too many arguments entered", after correcting it to iferror(search("BFH",A1,1)>0,right(A1,10))), it I reading the value wherever BFH is not there, if BFH present it is showing "TRUE"

    Kindly lemme know is there any other method to solve this

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: A cell should return a value by reading a string name

    I did not notice you still use the excel 2003 version.

    =if(iserror(search("BFH",A3,1)),"",right(A3,2))

  5. #5
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: A cell should return a value by reading a string name

    Hi Vishwa,

    Or you can try this in D1:

    =IF(COUNTIF(A1,"*BFH*"),RIGHT(A1,10),"")

    Blessing
    Khalid

  6. #6
    Forum Contributor
    Join Date
    02-07-2013
    Location
    Karachi, Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    290

    Re: A cell should return a value by reading a string name

    Quote Originally Posted by oeldere View Post
    d1=iferror(search("BFH",A1,1)>0,right(A1,10),""))
    Hi oeldere,

    I think you have missed the IF:
    =IFERROR(IF(SEARCH("BFH",A1,1),RIGHT(A1,10)),"")

    Blessing

+ 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: 0
    Last Post: 11-10-2015, 05:22 PM
  2. Script to Search for a specific String then return cell values above that String-4
    By owensjb2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-03-2015, 01:28 AM
  3. [SOLVED] Script to Search for a specific String then return cell values above that String-3
    By owensjb2 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2015, 01:50 PM
  4. Reading a string and changing data in a different cell
    By TheSiege82 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-03-2014, 11:00 PM
  5. [SOLVED] IF range of cells contains string of text, return contents of cell where string is found
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-03-2013, 09:56 AM
  6. Replies: 8
    Last Post: 10-19-2009, 02:14 AM
  7. Reading a string in one cell and using part of it to fill another
    By gambit in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-05-2007, 06:44 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