+ Reply to Thread
Results 1 to 9 of 9

Find a value within a range of many columns and rows (eg. A1:Z1000)

  1. #1
    Registered User
    Join Date
    02-03-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Find a value within a range of many columns and rows (eg. A1:Z1000)

    How do we find a value within a large range of cells (eg. Find "0001ABC" within A1:Z1000) and return the value of the cell right next to that value (eg. if you manage to find "0001ABC" which could be anywhere within A1:Z1000, give the value of the cell right next to it)?

    Many thanks!

  2. #2
    Registered User
    Join Date
    01-01-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010, 2013, 2016
    Posts
    47

    Re: Find a value within a range of many columns and rows (eg. A1:Z1000)

    Hi Dan.carpe,

    This is a simple index/match. You can look up how to use this in further detail online.

    Please find attatched the solution you were looking for.

    Hope it helps,

    J.

    ef - Dan.carpe 22 05 2015.xlsx

    remember to hit add rep, and mark as solved in your original thread

  3. #3
    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,933

    Re: Find a value within a range of many columns and rows (eg. A1:Z1000)

    @ James, Im not sure that is what the OP is asking for. It sounds like the search value could be anywhere in the table, not just in the 1st(?) column

    @ Dan, can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    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

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

    Re: Find a value within a range of many columns and rows (eg. A1:Z1000)

    Define "right next to it".

    To the left? The right? Above? Below?

    Can there be duplicates of the lookup value?
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    02-03-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41
    hi, if the value is found to be in cell F200 for example, I would want to return the value in cell G 200.

    It would only occur once within the multiple rows/columns.

  6. #6
    Registered User
    Join Date
    02-03-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Find a value within a range of many columns and rows (eg. A1:Z1000)

    Here's a sample: want to find "Cindy" and return "green"

    10 APE ORANGE 235
    22 CINDY GREEN CCDE110
    HER 10A GOLD JANUARY

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

    Re: Find a value within a range of many columns and rows (eg. A1:Z1000)

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    G
    1
    10
    APE
    ORANGE
    235
    Cindy
    GREEN
    2
    22
    CINDY
    GREEN
    CCDE110
    3
    HER
    10A
    GOLD
    JANUARY
    4
    ------
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in G1:

    =INDEX(A1:D3,MAX(IF(A1:D3=F1,ROW(A1:D3)))-ROW(A1)+1,MAX(IF(A1:D3=F1,COLUMN(A1:D3)))-COLUMN(A1)+2)

    ** 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.

  8. #8
    Registered User
    Join Date
    02-03-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Find a value within a range of many columns and rows (eg. A1:Z1000)

    Thanks Tony,

    Would that work if I change the lookup word to "gold" to find "January" for example, without needing to change the +1 or +2 row/column references?

    Many thanks

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

    Re: Find a value within a range of many columns and rows (eg. A1:Z1000)

    Quote Originally Posted by [email protected] View Post

    Would that work if I change the lookup word to "gold" to find "January" for example, without needing to change the +1 or +2 row/column references?
    Yes! ______

+ 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: 6
    Last Post: 11-08-2014, 07:07 PM
  2. Find Columns Not In Range(s)
    By goss in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2013, 07:47 PM
  3. [SOLVED] Find exact match in multiple columns in 1 row with all other rows 90,000 rows.
    By KHurt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-02-2013, 01:38 PM
  4. [SOLVED] Find rows that have at least one value across multiple columns
    By sb2406 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-08-2013, 10:16 AM
  5. [SOLVED] Using range.find to find two specific values in two columns
    By mhrub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2012, 01:02 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