+ Reply to Thread
Results 1 to 5 of 5

Find cell locatiopn by cell value in a worksheet or 2D matrix

  1. #1
    Registered User
    Join Date
    01-05-2014
    Location
    Auckland
    MS-Off Ver
    Excel 2010
    Posts
    3

    Question Find cell locatiopn by cell value in a worksheet or 2D matrix

    Hi Folks,

    I have a large worksheet that has some text and numbers in it. I have a value I am looking for and I need Excel to tell me where this value exists in the worksheet by giving me the absolute coordinates of the cell with the value.

    In the attached example I am looking for the value BREAD, and I want Excel to return it's absolute position F10. I included some blah values to show that the area with the data I am interested in varies in the worksheet day after day. I may use the entire worksheet as input or a large enough portion of the worksheet to ensure the desired word BREAD will be in it.

    I have been researching the web for a few weeks by now, I apparently lack the brain to get it. I tried using array functions but I could understand only the basics of their use. I have no problem finding the data in a vector and whenever I know a particular vector in my spreadsheet is always the same row or column, I can solve my problems fine. But this last piece requires me to compute the location of the first occurrence of BREAD.

    As a bonus I would love to be able to find locations of further occurrences, like I have CHEESE twice. Finding it once will help me find the second CHEESE anyway because I know the second CHEESE goes on the same row 3 columns to the left. But in case this layout changes, I would love to be prepared.

    There is no way for me to re-format the incoming worksheet as it is generated by a machine. I would prefer using formulas and or array formulas rather than scripts or macros because other people will be using my work, so I want to set this once and they won't have to change it after me.

    Pardon my English, I am not a native speaker.

    Hope my question makes sense, and if any of the forum admins can correct the typo in the thread name, I'd appreciate it.
    Attached Files Attached Files
    Last edited by KYTX; 01-05-2014 at 11:18 PM.

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Find cell locatiopn by cell value in a worksheet or 2D matrix

    Hi
    this macro finds all instances of a specified word on the worksheet and returns the cell/s where they were found

    Please Login or Register  to view this content.

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

    Re: Find cell locatiopn by cell value in a worksheet or 2D matrix

    Another option with array formula:
    Please Login or Register  to view this content.
    Confirmed with Ctrl-shift then Enter
    Quang PT

  4. #4
    Registered User
    Join Date
    01-05-2014
    Location
    Auckland
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find cell locatiopn by cell value in a worksheet or 2D matrix

    Wonderful guys, thank so much, I really appreciate your help and will give both a try and let you know how it goes this weekend. I am a kind of a man who prefers to know the tool inside out before using it so I will definitely take a look at how macros are written. Isn't it a sort of a script or user procedure? I use to do some coding in BASIC and Pascal back in uni. It might be a time for me to learn macros, never had to use them before that's is also why I thought I'd stick with using functions.

    About functions. I was wondering if I could run something like =MATCH("BREAD",$A$1:$Z$1,0) and make it run, like, through every line from 1 to 50 using an array function to find the column number and then run something like =MATCH("BREAD",$A$1:$A$50,0) and run it from A to Z to find the row number and then use the row and the column number to get the coordinates? Or am I overcomplicating things? Why I am taking A to Z 1 to 50 is to make sure I take a big enough area of the table to catch the location of BREAD.

    About the example of the formula by bebo021999, I am not too sure I get how it works. What does this expression do: $A$1:$I$12="BREAD" ? ANd then you multiply it by column? Like I said I gotta be lacking brain to just get it. Do you mind explaining how it works? I spent so much time on research so I really want to come to an understanding how it works.

    Thanks a lot

  5. #5
    Registered User
    Join Date
    01-05-2014
    Location
    Auckland
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Find cell locatiopn by cell value in a worksheet or 2D matrix

    Hi folks! I tried the array formula and it worked! I actually had to modify the solution offered by bebo021999 but it is what I was looking for. It is still quite retarded that Excel does not have a built-in feasy feature to search in a matrix but I am able to do it now, thanx! I have not tried the macro yet but I will, it may open new ways of doing what I am doing.

    We can close this thread now, I suppose.

+ 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-06-2012, 06:44 PM
  2. [SOLVED] Trying to Find selected cell content within another worksheet cell range.
    By Craigside in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-13-2012, 04:36 PM
  3. Set Find Value from a Worksheet cell
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-30-2010, 07:32 PM
  4. trying to find how to display worksheet name in cell
    By Yvonne Barber in forum Excel General
    Replies: 1
    Last Post: 09-15-2005, 04:05 PM
  5. VBA: Add cell value to another worksheet cell using Find and offset
    By Caméléon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2005, 01:06 AM

Tags for this Thread

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