+ Reply to Thread
Results 1 to 7 of 7

ROW-function does not work with INDIRECT-function

  1. #1
    Forum Contributor
    Join Date
    08-19-2009
    Location
    Netherlands, Amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    585

    ROW-function does not work with INDIRECT-function

    Hello all,

    The following formula works:

    =SLOPE(INDIRECT("R"&10&"C7:R"&10&"C10";FALSE);INDIRECT("R"&9&"C7:R"&9&"C10";FALSE))

    but if I replace the row number with ROW() it does not.

    =SLOPE(INDIRECT("R"&ROW()&"C7:R"&ROW()&"C10";FALSE);INDIRECT("R"&9&"C7:R"&9&"C10";FALSE))

    I tried both formulas on the 10th row

    All help welcome

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: ROW-function does not work with INDIRECT-function

    UPDATE: No, I was right, I'm getting an error copying both formulas into row 10

    Removing the SLOPE and INDIRECT...

    first formula results in

    R10C7:R10C10

    second formula results in

    R10C7:R10C10

    Perhaps you can't dow row/column in an INDIRECT ? Maybe it has to be a range of cell references ?
    Last edited by Special-K; 07-08-2016 at 11:27 AM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    08-19-2009
    Location
    Netherlands, Amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    585

    Re: ROW-function does not work with INDIRECT-function

    Hello Special-K

    Why should it be ignored?

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: ROW-function does not work with INDIRECT-function

    I meant ignore my reply.
    I thought I found an error.
    Then I didn't think that.
    But now I do again (see my first reply).

    I'm still getting errors copying those formulas into row 10.

    Further
    if you put the results of R10C7:R10C10 in an INDIRECT it comes up with a #REF error.
    Maybe you have to set the option for row/column referencing?

  5. #5
    Forum Contributor
    Join Date
    08-19-2009
    Location
    Netherlands, Amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    585

    Re: ROW-function does not work with INDIRECT-function

    The formulas are OK except for the ROW() part.
    See enclosed example
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    08-19-2009
    Location
    Netherlands, Amsterdam
    MS-Off Ver
    Excel 2010
    Posts
    585

    Re: ROW-function does not work with INDIRECT-function

    Found it out already
    ROW seems to return an array and to get its first element I should have used INDEX(ROW(),1)

    The following worked
    =SLOPE(INDIRECT("R"&INDEX(ROW(),1)&"C7:R"&INDEX(ROW(),1)&"C10";FALSE);INDIRECT("R"&9&"C7:R"&9&"C10";FALSE))

    Thanks for your help Special-K

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: ROW-function does not work with INDIRECT-function

    Quote Originally Posted by Jonathan78 View Post
    ROW seems to return an array and to get its first element I should have used INDEX(ROW(),1)
    Or, you can use any one of these functions:

    MIN
    MAX
    SUM

    MIN(ROW())
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. Indirect function causing formula not to work
    By JohnDoh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-13-2015, 11:48 AM
  2. Getting the indirect function to work properly.
    By Kashus in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-05-2014, 08:49 PM
  3. [SOLVED] Can't Get Indirect Function to Work in Menu
    By BigBadBill in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-27-2013, 01:49 PM
  4. [SOLVED] Help with INDIRECT FUNCTION Doesn't work
    By Kinez101 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-07-2013, 11:12 AM
  5. [SOLVED] Cannot get INDIRECT function to work with SUMIFS
    By kborgers in forum Excel General
    Replies: 6
    Last Post: 11-22-2012, 11:21 AM
  6. Can the indirect.ext function work within a SharePoint environment?
    By JacksonElliot in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-19-2012, 06:55 PM
  7. Replies: 4
    Last Post: 05-12-2006, 02:00 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