+ Reply to Thread
Results 1 to 6 of 6

Change sheet number in middle of sumif formula

  1. #1
    Registered User
    Join Date
    10-06-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    28

    Change sheet number in middle of sumif formula

    Hi,

    I have this formula

    =SUMIF('1'!$D$4:$D$10,$B5,'1'!$G$4:$G$10)

    I need the sheet number to increase as I drag it across, everything else does as it should.
    I've used indirect before, but can't see how to fit it in here.

    Thanks
    Last edited by P4r4gon; 09-17-2016 at 10:41 AM.

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

    Re: Change sheet number in middle of sumif formula

    What is the first cell that you are entering the formula in?
    Last edited by Tony Valko; 09-17-2016 at 10:47 AM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    10-06-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    28

    Re: Change sheet number in middle of sumif formula

    It will be C5 in a sheet named Overview

    I 52 sheets (weeks) need the overview to in C5 look for the name in B5 in the cells D4:D10 in sheet1 (Week 1) then return the total mins in cells G4:G10, then in D5 of the overview sheet do the same with the same cells but just from shhet2 (weeek 2)

    Thanks for looking

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

    Re: Change sheet number in middle of sumif formula

    Try this...

    =SUMIF(INDIRECT("'"&COLUMNS($C5:C5)&"'!D4:D10"),$B5,INDIRECT("'"&COLUMNS($C5:C5)&"'!G4:G10"))

  5. #5
    Registered User
    Join Date
    10-06-2014
    Location
    England
    MS-Off Ver
    2013
    Posts
    28

    Re: Change sheet number in middle of sumif formula

    Brilliant. Works a treat. Thanks a lot.

  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: Change sheet number in middle of sumif formula

    You're welcome. Thanks for the feedback!

+ 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: 5
    Last Post: 01-15-2016, 06:16 PM
  2. How to change work sheet number will dragging a formula
    By itsajanrs in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 10-04-2014, 01:23 PM
  3. Replies: 17
    Last Post: 06-09-2013, 09:43 AM
  4. formula to change sheet number when dragged
    By italy426 in forum Excel General
    Replies: 5
    Last Post: 12-02-2010, 04:37 PM
  5. Replies: 0
    Last Post: 04-18-2006, 02:10 PM
  6. [SOLVED] how do I change column width in the middle of an Excel sheet?
    By Malcolm in forum Excel General
    Replies: 3
    Last Post: 03-23-2006, 08:35 AM
  7. page number middle of sheet
    By seeker53 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-16-2005, 08:05 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