+ Reply to Thread
Results 1 to 8 of 8

Define Name with match and indirect

Hybrid View

  1. #1
    Registered User
    Join Date
    02-24-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    47

    Define Name with match and indirect

    What I'm trying to do is to create a formula that searches for a match in an array and if it finds it, returns the row number but adds an offset of 35 and then use that data as part of a cell reference in a formula.

    So if the match = 5, it'll add 35 to it to make it 40 and then in a formula would reference cell J40.


    Indefining the name JUMP1, I've entered this

    MATCH(INDIRECT(ADDRESS(ROW(),COLUMN()-3)),G113:G130),0)+35

    This works as a stand alone formula, but doesn't seem to work when I use it to define a name. When I try, it adds the sheet name and changes it to this.

    MATCH(INDIRECT(ADDRESS(ROW(),COLUMN()-3)),May!G113:G130),0)+35

    Which I don't think should be a problem. But then when I try to use the name in my formula...

    IF(AND((EDATE(INDIRECT("J"&JUMP1),1)>=(C45)),(EDATE(INDIRECT("J"&JUMP1),1)<=(C45)+6)),DATE(YEAR(C45),MONTH(C45),DAY(EOMONTH(C45,0))),INDIRECT("J"&JUMP1)),IF(AND((EDATE(INDIRECT("J"&JUMP1),1)>=(C45)),(EDATE(INDIRECT("J"&JUMP1),1)<=(C45)+6)),EDATE(INDIRECT("j"&JUMP1),1),INDIRECT("j"&JUMP1)))

    ... it doesn't work and even just testing the name with =Jump1 doesn't seem to work.

    I realize this may be complicated AF, I barely understand it myself lol. But does anyone have any thoughts on how to solve this?


    Thanks in advanced.
    Last edited by Immortalis15; 05-20-2020 at 11:59 PM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Define Name with match and indirect

    Maybe I misread but would it not be;

    MATCH(INDIRECT(ADDRESS(ROW()+35,COLUMN()-3)),G3:G30),0)
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    02-24-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Define Name with match and indirect

    I don't believe so. Ok my example was very poor.

    Let's change the example to MATCH(INDIRECT(ADDRESS(ROW(),COLUMN()-3)),G113:G130),0)+112

    Whatever is in the cell 3 columns to the left of current INDIRECT(ADDRESS(ROW(),COLUMN()-3)) is what I'm searching for to match in the array G113:G130.

    Let's say it matches and returns a value of 5 and then I add 112 to it. In the array 113:130, returning a value of 5 would mean the ACTUAL row it's in is 117. So to get the actual row, no matter what value comes up, I have to add 112 to it.

    I hope that clears it up?

  4. #4
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Define Name with match and indirect

    "I don't believe so."

    Did you test it?

  5. #5
    Registered User
    Join Date
    02-24-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Define Name with match and indirect

    No, It just doesn't make sense to me.

    If I'm working in cell F200 then I want to match cell C200 to something within the array.

    From cell F200, INDIRECT(ADDRESS(ROW(),COLUMN()-3)) would refer to C200

    Your modification would add 35 rows to it, so would try to match what's in cell C235 instead of C200.

    Unless I'm mistaken, but as I had mentioned, my formula works just fine on it's own as a formula, it just doesn't work using it in defining a NAME.

  6. #6
    Registered User
    Join Date
    02-24-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    47
    Quote Originally Posted by oeldere View Post
    "I don't believe so."

    Did you test it?


    I tested your theory and it gave me a circular reference warning.

  7. #7
    Registered User
    Join Date
    02-24-2011
    Location
    Ontario
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: Define Name with match and indirect

    Well, disappointed that noone was able to help but I found a different way to do what I was trying to do.

  8. #8
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Define Name with match and indirect


    You may have more chances next time if you at least create the thread in the appropriate forum …

+ 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: 2
    Last Post: 07-06-2018, 10:07 PM
  2. Vlookup with indirect to define the array
    By Rohirrim85 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-10-2016, 03:06 PM
  3. [SOLVED] Data Validation & Define Name & Indirect function
    By MrAlex in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-02-2015, 03:24 PM
  4. [SOLVED] Nest mutiple indirect functions to define a range.
    By BAVE in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-27-2012, 10:05 AM
  5. [SOLVED] how do I define a chart series with an indirect reference
    By tvanellen in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-31-2006, 05:55 AM
  6. [SOLVED] Define chart range using indirect reference
    By Thomas in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-10-2006, 04:50 PM
  7. Define Name problem using INDIRECT with ROW()
    By pbassett in forum Excel General
    Replies: 0
    Last Post: 03-10-2005, 02:45 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