+ Reply to Thread
Results 1 to 10 of 10

Search and Return the value of a cell that begins with specific text?

  1. #1
    Registered User
    Join Date
    11-13-2015
    Location
    WA
    MS-Off Ver
    365 Enterprise
    Posts
    21

    Search and Return the value of a cell that begins with specific text?

    Need a formula to return the value of a cell that begins with specific text "Report Parameters".

    I paste raw data to a sheet and "Column A" always has one row near the bottom that starts with "Report Parameters". I want the text of that cell to show in another palce in my template. The problem is that depending the report, that text gets pasted to different rows, but always in Column A. Lets say, I want the value of that cell to show up in cell B1
    Last edited by Kirk3737; 11-13-2015 at 08:04 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Search and Return the value of a cell that begins with specific text?

    Hi, welcome to the forum

    Try this...
    =INDEX(A:A,match("Report Parameters*",A:A,0)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    11-13-2015
    Location
    WA
    MS-Off Ver
    365 Enterprise
    Posts
    21

    Re: Search and Return the value of a cell that begins with specific text?

    I get a #N/A using that. Your formula works, becuase I tried in on other items in column A, but not finding the "Report Parameters" cell.

    I tried this also, =INDEX(A:A,MATCH(LEFT("Report Par*",11),A:A,0)), but still get #N/A result. Could it be the format of that data in that cell? It seems to have a lot of returns in it to wrap the text

    Example pasted from cell:
    "Report Parameters:
    PID: 10435711
    Team: National
    Item Status: Base, New Confirmed, New Unconfirmed
    Response Type: Last
    Display Mode: Count
    Show Stores: All
    Clients: CHURCH & DWIGHT
    Store Priority: High"

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Search and Return the value of a cell that begins with specific text?

    Is there perhaps a space at trhe start of that text?

    Also, try just this...
    match("Report Parameters*",A:A,0)
    and reduce (1 at a time) the letters in "Report Parameters*"

    If you still have a problem, upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  5. #5
    Registered User
    Join Date
    11-13-2015
    Location
    WA
    MS-Off Ver
    365 Enterprise
    Posts
    21

    Re: Search and Return the value of a cell that begins with specific text?

    I appriciate the help and thanks for the welcome That match formula did not work either.

    Please see attached small sample. Data is in A21, tring to capture in C1. You can see formula works C3 and finds C23 data. My end goal is results in K1, but the "Report Parameters" is not always fixed in the same cell.
    Attached Files Attached Files

  6. #6
    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,228

    Re: Search and Return the value of a cell that begins with specific text?

    The problem is that A21 is more than 255 characters in length and MATCH will not work strings > 255.


    Wrong again!!!!
    Last edited by JohnTopley; 11-14-2015 at 08:35 AM.

  7. #7
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,587

    Re: Search and Return the value of a cell that begins with specific text?

    To get cell value like A21
    ARRAY formula (In C1)
    Please Login or Register  to view this content.
    to get value like K1
    ARRAY formula (In S1)
    Please Login or Register  to view this content.
    ARRAY formula is used

    To enter ARRAY formula
    Paste the formula
    Press F2
    Press Ctrl+Shift+Enter keys together.
    Attached Files Attached Files

  8. #8
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Search and Return the value of a cell that begins with specific text?

    I didn't download your file.

    Try something like this:

    Array entered**:

    =INDEX(A2:A10,MATCH(TRUE,LEFT(A2:A10,17)="Report Parameters",0))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  9. #9
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Search and Return the value of a cell that begins with specific text?

    Alternative option:

    =LOOKUP(2,1/(SEARCH("Report Parameters",A:A)=1),A:A)

    returns last cell found in column A starting with "Report Parameters"
    Quang PT

  10. #10
    Registered User
    Join Date
    11-13-2015
    Location
    WA
    MS-Off Ver
    365 Enterprise
    Posts
    21

    Re: Search and Return the value of a cell that begins with specific text?

    THANK YOU! Both worked very well.

+ 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. Text Function--Specifically search and return a specific value
    By jcallah2 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-19-2015, 09:56 AM
  2. Search for multiple texts in cell, return specific text
    By mariur89 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 11-24-2014, 06:43 PM
  3. [SOLVED] VBA to search cell containing specific text and return common value
    By hate0lif3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-30-2014, 09:41 AM
  4. [SOLVED] Display chosen number if cell text begins with specific letter
    By BPSJACK in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-03-2014, 07:12 AM
  5. Replies: 4
    Last Post: 08-15-2013, 09:50 AM
  6. [SOLVED] IF number/text in a cell begins with specific letter, then return desired word
    By BPSJACK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-28-2013, 06:02 AM
  7. [SOLVED] search for specific text in a file and return a value to a cell based on the results
    By JJGF in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-03-2013, 07:00 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