+ Reply to Thread
Results 1 to 7 of 7

How to update cell reference when "dragging" and INDIRECT forumla

  1. #1
    Registered User
    Join Date
    07-10-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2010
    Posts
    3

    How to update cell reference when "dragging" and INDIRECT forumla

    Hi all,

    I've searched the forums, but don't have a really good answer for my formula. I am using the formula below to sum across several worksheets, and the formula I am using works fine, but when I copy the formula across to other cells, I can't figure out how to have it update my cell range:

    =SUMPRODUCT(SUMIF(INDIRECT("'"&$A$1:$A$4&"'!A:A"),$B4,INDIRECT("'"&$A$1:$A$4&"'!G:G")))

    The range A:A is ok to be static, but I need the G:G to be dynamic so when I drag it to the right it will change from G:G to H:H. I:I, etc.


    Any help would be much appreciated.
    Last edited by mikicia; 07-10-2014 at 01:15 PM.

  2. #2
    Forum Expert
    Join Date
    03-28-2014
    Location
    Hyderabad,India
    MS-Off Ver
    Excel 2013
    Posts
    1,887

    Re: How to update cell reference when "dragging" and INDIRECT forumla

    hi,

    Upload sample workbook with out any confidential data.

    Punnam

  3. #3
    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: How to update cell reference when "dragging" and INDIRECT forumla

    Maybe this?

    =SUMPRODUCT(SUMIF(INDIRECT("'"&$A$1:$A$4&"'!A:A"),$B4,INDIRECT("'"&$A$1:$A$4&"'!"&CHAR(64+COLUMNS($A$1:G1))&":"&CHAR(64+COLUMNS($A$1:G1))&"")))
    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

  4. #4
    Registered User
    Join Date
    07-10-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2010
    Posts
    3

    Re: How to update cell reference when "dragging" and INDIRECT forumla

    Your formula worked.... thank you so much for your help!

  5. #5
    Registered User
    Join Date
    07-10-2014
    Location
    Ontario, Canada
    MS-Off Ver
    Office 2010
    Posts
    3

    Re: How to update cell reference when "dragging" and INDIRECT forumla

    Ok update, when I get to "AA" Column and error appears as the character is "]"

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

    Re: How to update cell reference when "dragging" and INDIRECT forumla

    Another possibility...

    =SUMPRODUCT(SUMIF(INDIRECT("'"&$A$1:$A$4&"'!A:A"),$B4,INDIRECT("'"&$A$1:$A$4&"'!"&CELL("address",G:G))))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  7. #7
    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: How to update cell reference when "dragging" and INDIRECT forumla

    I din't expect it will need to go so far to the right. But here is corrected formula. The range will go to the very end

    =SUMPRODUCT(SUMIF(INDIRECT("'"&$A$1:$A$4&"'!A:A"),$B4,INDIRECT("'"&$A$1:$A$4&"'!"&SUBSTITUTE(ADDRESS(1,COLUMNS($A$1:G1),4)&":"&ADDRESS(1,COLUMNS($A$1:G1),4),1,"")&"")))
    Last edited by AlKey; 07-10-2014 at 05:00 PM.

+ 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. [SOLVED] Add "IF" to existing "MOD" cell forumla
    By chriswhite1982 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-18-2013, 06:50 PM
  2. Circular Reference? - INDIRECT and CELL("filename") Usage
    By Nicked in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2012, 01:20 PM
  3. Dragging "INDIRECT" formula
    By hamspankin1 in forum Excel General
    Replies: 3
    Last Post: 12-08-2010, 08:25 AM
  4. Replies: 4
    Last Post: 10-29-2009, 12:08 PM
  5. "Indirect" reference to a cell in a code: how to do it?
    By bondcrash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2005, 12:05 PM

Tags for this Thread

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