+ Reply to Thread
Results 1 to 8 of 8

Find a cell address containing a value within an array

Hybrid View

  1. #1
    Registered User
    Join Date
    10-05-2013
    Location
    Thunder Bay, ON
    MS-Off Ver
    Excel 2007
    Posts
    2

    Find a cell address containing a value within an array

    Hi... hopefully someone can help.
    In the following example, I need to create a formula to identify the cell address containing the string value "X"

    B C D E F X A B C D E F X A B C D E F

    Assuming this was row A, the formula needs to return $A$6 (or A6).

    Thanks!

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find a cell address containing a value within an array

    Assuming your range starts in A1
    in A2 enter copy and paste formula and drag it across

    =IF(A1="X",CELL("address",A1),"")
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,937

    Re: Find a cell address containing a value within an array

    Unfortunately there is no row A. What would you expect if it were in row 13 instead?
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    10-05-2013
    Location
    Thunder Bay, ON
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Find a cell address containing a value within an array

    Sorry you are correct, there is no row A... my bad.

    So if the same array were in row 13, I need to create a formula to identify the cell address containing the string value "X"

    B C D E F X A B C D E F X A B C D E F

    The formula needs to return $F$13 (or F13).

    Thanks!

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find a cell address containing a value within an array

    Quote Originally Posted by JeffRW View Post
    Sorry you are correct, there is no row A... my bad.

    So if the same array were in row 13, I need to create a formula to identify the cell address containing the string value "X"

    B C D E F X A B C D E F X A B C D E F

    The formula needs to return $F$13 (or F13).

    Thanks!
    You have to be a little bit more specific. What exactly is your range? Does it starts in A13 and ends where? Is your data located in the row or in the column? Stating that row 13? Row 13 has 16,835 cells!

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Find a cell address containing a value within an array

    This will give you a relative reference. X is in cell A1 and the array is in row 13. Enter with Ctrl + Shift + Enter

    Formula: copy to clipboard
    =ADDRESS(MIN(IF(A13:S13=A1,ROW(A13:S13))),MIN(IF(A13:S13=A1,COLUMN(A13:S13))),4)


    This will give an absolute reference.

    Formula: copy to clipboard
    =ADDRESS(MIN(IF(A13:S13=A1,ROW(A13:S13))),MIN(IF(A13:S13=A1,COLUMN(A13:S13))))
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: Find a cell address containing a value within an array

    welcome to the forum, JeffRW. try:
    =ADDRESS(ROW(A13),MATCH("X",A13:S13,0))
    or:
    =ADDRESS(ROW(A13),MATCH("X",A13:S13,0),4)

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  8. #8
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Find a cell address containing a value within an array

    Enter formula in A14

    =IF(A13="X",CELL("address",A13),"")

    A
    B
    C
    D
    E
    F
    G
    H
    I
    13
    B C D E F X A B C
    14
    $F$13
    15

+ 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: 1
    Last Post: 05-26-2012, 03:03 AM
  2. Match/Index array in VBA to return cell address
    By djhsickboy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-02-2011, 02:18 AM
  3. Using cell values to address an array
    By jlt199 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-19-2010, 11:01 PM
  4. Finding the address of a cell in a 2D array
    By Marz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-04-2007, 02:06 PM
  5. How to express a cell address into numeric for array use
    By Susan Hayes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-06-2005, 08:06 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