+ Reply to Thread
Results 1 to 9 of 9

Locate Number in Table and Return Coordinates.

  1. #1
    Registered User
    Join Date
    06-22-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Locate Number in Table and Return Coordinates.

    All,

    I am trying to figure out the way how to accomplish the following:

    I have a table 100 x 100 (cells)

    I need to find a number (lets say "53") in this table, and return 2 values.

    1 value for Row, and 1 value for column.

    For example:

    A, B, C, D - columns
    1
    2 53
    3
    4


    I need to search for number "53" .. and the result should be Row = 2, Column = B.

    Any insight will be greatly appreciated.

    Thanks

    Alex
    Last edited by alexie0830; 06-22-2010 at 07:19 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,717

    Re: Interesting Challenge - Excel

    Do you want that in 2 cells or all in one like B2 or $B$2?

    Could 53 appear more than once, if so which address should it return?
    Audere est facere

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Interesting Challenge - Excel

    alexie, please take a few minutes to read the forum rules, and then amend your thread title accordingly.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Registered User
    Join Date
    06-22-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Interesting Challenge - Excel

    The result should be in 2 cells..

    Once cell Row number
    Another cell Column number.

    If more than one 53 exists in the table, list all coordinates.

    Thanks

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Locate Number in Table and Return Coordinates.

    If the value only appears once in the table, this returns the address where it appears:

    =ADDRESS(SUMPRODUCT((tbl=53)*ROW(tbl)), SUMPRODUCT((tbl=53)*COLUMN(tbl)), 4)

    ... where tbl is the named range for the table, or just a reference to the table range.

  6. #6
    Registered User
    Join Date
    06-22-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Locate Number in Table and Return Coordinates.

    Hi ... Its almost what i meant... but in this formula, the result comes back with 1 value. (H5) ...

    What i am looking for is 2 values. H and 5, where H is a column and 5 is a row...

  7. #7
    Registered User
    Join Date
    06-22-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Locate Number in Table and Return Coordinates.

    I have a Table with Horizontal labels from 1 thru 100 and Vertical labels from 1 thru 100.

    InnerTable has all these random numbers (10,000 numbers total). What i am looking for is return 2 values... 1 value for the Horizontal Label (Columns) and another value for Vertical Label (rows) ...

    So essentially, if i am searching for number "53" .. It should return 8 and 7 (where 8= Column I, and 7 equals row = 7).

  8. #8
    Registered User
    Join Date
    08-22-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Locate Number in Table and Return Coordinates.

    Did this get solved? I have same problem :-/

  9. #9
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Locate Number in Table and Return Coordinates.

    Anubhav,

    This is a 3 yr old question and not likely that the original poster will come back to you. Its better you post a new thread with your question. You will get faster replies.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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