+ Reply to Thread
Results 1 to 4 of 4

convert text string to cell address to use in a nested function

  1. #1
    Registered User
    Join Date
    10-12-2012
    Location
    hartford, ct
    MS-Off Ver
    Excel 2007
    Posts
    2

    Cool convert text string to cell address to use in a nested function

    Hi all,

    I'm creating an automated spreadsheet to use in my football pool and am running into some trouble. I have 2 address functions "ADDRESS(MATCH(4,$A$1:$A$999,0)+2,3)" and "ADDRESS(MATCH(4,$A$1:$A$999,0)+40,3)" which return the text strings $C$132 and $C$170, respectively. I would like to nest these results in a "MATCH($F$7,$C$132:$C$170,0)" however the address function returns a text string and not an actual cell location. Essentially I want to make this function work:
    "MATCH($F$7,(ADDRESS(MATCH(4,$A$1:$A$999,0)+2,3))ADDRESS(MATCH(4,$A$1:$A$999,0)+40,3),0)"
    I've tried the indirect function but this returns the $C$132 and $C$170 values not the locations

    Thanks,
    Paul

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: convert text string to cell address to use in a nested function

    This should work with the INDIRECT() function.

    =MATCH($F$7, INDIRECT(ADDRESS(MATCH(4,$A$1:$A$999,0)+2,3)&":"&ADDRESS(MATCH(4,$A$1:$A$999,0)+40,3)),0)


    You could also use the OFFSET() function:

    =MATCH($F$7, OFFSET(INDEX($C$1:$C$999, MATCH(4,$A$1:$A$999,0)+2),,,38,), 0)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    10-12-2012
    Location
    hartford, ct
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: convert text string to cell address to use in a nested function

    thanks that worked. If $C$132 and $C$170 are in Sheet 2 and I want the formula to be in sheet 1 how do I reference these cell ranges?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: convert text string to cell address to use in a nested function

    Add the sheetname to the reference.

    =MATCH($F$7, OFFSET(INDEX(Sheet2!$C$1:$C$999, MATCH(4,Sheet2!$A$1:$A$999,0)+2),,,38,), 0)

+ 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