+ Reply to Thread
Results 1 to 12 of 12

Dragging SUM formula

Hybrid View

  1. #1
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Dragging SUM formula

    What cell is your formula in, you could probably utilise indirect and row functions to get what you want. For example, if in A1 you have:
    =sum('shift Data'!D3:D16)
    and in A2 you want:
    =sum('shift Data'!D17:D30)
    then change A1 to :
    =sum(indirect("'Shift Data'!D"& (ROW(A1)-1)*14+3 & ":D" & (ROW(A1)-1)*14+16))

  2. #2
    Registered User
    Join Date
    01-15-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    53

    Re: Dragging SUM formula

    Quote Originally Posted by yudlugar View Post
    What cell is your formula in, you could probably utilise indirect and row functions to get what you want. For example, if in A1 you have:
    =sum('shift Data'!D3:D16)
    and in A2 you want:
    =sum('shift Data'!D17:D30)
    then change A1 to :
    =sum(indirect("'Shift Data'!D"& (ROW(A1)-1)*14+3 & ":D" & (ROW(A1)-1)*14+16))
    Thank you, this seems to work perfectly. Though I confess, I'm not sure why.

    I have no experience of the 'indirect' function so I may be missing something. The cell that I am beginning with is B3. Leaving the A1 in your formula as it is makes the formula work fine, changing it to B3 makes it reference different cells (and returns the wrong answer), changing it to B1 makes it work fine. However A1 and B1 both have writing in or are blank. There must be something about it that I don't understand.

    However, I have several columns and have copied it across, changing the column reference in the shift data sheet for each and it has worked for them all, so thank you.

+ 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. VBA Macro: Plugging an Array-Formula into a Cell and Dragging Formula Down Columns
    By Brianandstewie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2013, 02:57 PM
  2. Replies: 3
    Last Post: 03-28-2013, 12:41 PM
  3. [SOLVED] Formula dragging
    By swmwshrk in forum Excel General
    Replies: 2
    Last Post: 07-22-2012, 10:15 PM
  4. Replies: 1
    Last Post: 04-30-2012, 10:01 PM
  5. Dragging down a formula
    By spread in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-09-2007, 09:34 AM

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