+ Reply to Thread
Results 1 to 7 of 7

Keeping the row the same but changing the column when dragging a formula down

  1. #1
    Registered User
    Join Date
    06-06-2011
    Location
    UK
    MS-Off Ver
    2016
    Posts
    22

    Keeping the row the same but changing the column when dragging a formula down

    Hi all,

    I have a workbook that looks something like:
    Worksheet 1

    User Jan Feb Mar Apr etc

    A
    B
    C

    etc

    Worksheet 2

    Date User 1 Name User 2 Name User 3 name etc

    01/01/11
    02/01/11
    03/01/11
    etc

    Essentially a user enters their holidays by putting '1's next to the date they would like to take off in Worksheet 2. Worksheet 1 would total the number of days off in any given month. I've done this by using

    =SUMPRODUCT((Holidays!$A$3:$A$368>=DATEVALUE("01/01/2012"))*(Holidays!$A$3:$A$368<=DATEVALUE("31/01/2012")),Holidays!B$3:B$368)
    Where Holidays!$A$3:$A$368 contains the dates and Holidays!B$3:B$368 is that users column.
    When I try and copy this down the worksheet I would like the B to update to column C and so on. I've tried using INDIRECT or INDEX but can't seem to get them to work. Is it possible to it with one of these? If so, how? Should I be looking at a different approach?

    I've seen similar issues posted on here before but its the merging it with my current formula I'm having real difficulty with.

    Thanks

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Keeping the row the same but changing the column when dragging a formula down

    It will be easier if you attach the workbook.

  3. #3
    Valued Forum Contributor khamilton's Avatar
    Join Date
    10-08-2009
    Location
    IL
    MS-Off Ver
    Excel 2007
    Posts
    345

    Re: Keeping the row the same but changing the column when dragging a formula down

    Please Login or Register  to view this content.
    This will only work for single letter columns. Char(65) is A. The Rows($A$1:A1) copied down will increase char 65 to 66, 67 ,68 and so on which will go from A ,B ,C ,D and so on. Hope this helps.
    Please acknowledge the response you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  4. #4
    Registered User
    Join Date
    06-06-2011
    Location
    UK
    MS-Off Ver
    2016
    Posts
    22

    Re: Keeping the row the same but changing the column when dragging a formula down

    Quote Originally Posted by arlu1201 View Post
    It will be easier if you attach the workbook.
    Done.

    Quote Originally Posted by khamilton View Post
    Please Login or Register  to view this content.
    This will only work for single letter columns. Char(65) is A. The Rows($A$1:A1) copied down will increase char 65 to 66, 67 ,68 and so on which will go from A ,B ,C ,D and so on. Hope this helps.
    Thanks, but the spreadsheet is huge....so I need more than single letter columns
    Last edited by neato; 11-21-2011 at 08:48 AM.

  5. #5
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Keeping the row the same but changing the column when dragging a formula down

    See attached.

    Note I've had to change the cells B1:M1 to dates, formatted with 'mmm' to look how they did previously.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-06-2011
    Location
    UK
    MS-Off Ver
    2016
    Posts
    22

    Re: Keeping the row the same but changing the column when dragging a formula down

    Hi,

    I've opened this and had a look but I'm just getting a seried of #NAME? errors.

  7. #7
    Valued Forum Contributor
    Join Date
    10-13-2010
    Location
    Sunderland, England
    MS-Off Ver
    Excel 2007 (Home) / 2003 (Work)
    Posts
    740

    Re: Keeping the row the same but changing the column when dragging a formula down

    Hmm, I really don't know why that would be; I've just reopened it via the attachment and it's working fine for me.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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