+ Reply to Thread
Results 1 to 9 of 9

Looking up a value to return the cell reference

  1. #1
    Registered User
    Join Date
    03-03-2017
    Location
    Felixstowe, England
    MS-Off Ver
    15
    Posts
    3

    Looking up a value to return the cell reference

    Hi,

    I have a range of values in an array, i want to look up a value in that array and return the cell reference.

    My array is from b2:f7, so i am looking for a formula to return the cell reference for a valid entry in this range. For example if f7=30, and in cell x20 i also have 30, what formula do i use to find the 30 in the range b2:f7 by reference to x20?

    I've battled with this all day and looked at more sites than i care to think about. Lots of comments about cell address, match, Index etc but while i can get a formula to work for one row when the row changes the formula falls over.

    Can anyone help me please?

    Thanks

    Peter

  2. #2
    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,152

    Re: Looking up a value to return the cell reference

    Try

    =ADDRESS(SUMPRODUCT(($B$2:$F$7=X20)*(ROWS($B$2:$F$7)+1)),SUMPRODUCT(($B$2:$F$7=X20)*(COLUMNS($B$2:$F$7)+1)))

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Looking up a value to return the cell reference

    Hey John,

    What if the number in X20 isn't found? Also, can you do this using a CSE formula?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    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,152

    Re: Looking up a value to return the cell reference

    Then ...

    =IFERROR(ADDRESS(SUMPRODUCT(($B$2:$F$7=X20)*(ROWS($B$2:$F$7)+1)),SUMPRODUCT(($B$2:$F$7=X20)*(COLUMNS($B$2:$F$7)+1))),"")

  5. #5
    Registered User
    Join Date
    03-03-2017
    Location
    Felixstowe, England
    MS-Off Ver
    15
    Posts
    3

    Red face Re: Looking up a value to return the cell reference

    Hi,

    Thanks for the quick response.

    I have tried this and whatever value is in x20 it always returns the same cell reference. I have only tried for valid references.

    Any other ideas?

    Thanks

    Peter

  6. #6
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,901

    Re: Looking up a value to return the cell reference

    Try this ...

    =ADDRESS(SUMPRODUCT(($B$2:$F$7=X20)*ROW($B$2:$F$7)),SUMPRODUCT(($B$2:$F$7=X20)*COLUMN($B$2:$F$7)))

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Looking up a value to return the cell reference

    Hey phuocam,

    Good Job!! I believed John's answer above without checking it. My bad. His formula didn't work and yours does!!

  8. #8
    Registered User
    Join Date
    03-03-2017
    Location
    Felixstowe, England
    MS-Off Ver
    15
    Posts
    3

    Smile Re: Looking up a value to return the cell reference

    Thank you, thank you, thank you 100 times. I spent ages looking at this and you guys have fixed it for me.

    Amazing!

    Peter

  9. #9
    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,152

    Re: Looking up a value to return the cell reference

    Sorry about my "typo" re ROWS and ROW! Thank you Phuocam!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Return cell reference instead of value
    By lmason in forum Excel General
    Replies: 3
    Last Post: 03-30-2021, 07:37 PM
  2. [SOLVED] Return cell reference
    By Bas1 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-29-2016, 07:44 AM
  3. Search a cell reference and return another cell reference
    By klixcel in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-05-2016, 04:11 PM
  4. [SOLVED] Return Cell Reference
    By Mike_e in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-17-2011, 06:28 AM
  5. Return of cell reference
    By Saturn in forum Excel General
    Replies: 5
    Last Post: 06-13-2010, 03:44 AM
  6. [SOLVED] How to return cell reference
    By et in forum Excel General
    Replies: 9
    Last Post: 06-10-2006, 05:55 PM
  7. Return value in cell above the reference
    By Jean in forum Excel General
    Replies: 4
    Last Post: 05-31-2006, 02:50 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