+ Reply to Thread
Results 1 to 4 of 4

Copy and Drag formula!!

  1. #1
    Registered User
    Join Date
    04-08-2011
    Location
    Dalhart, Texas
    MS-Off Ver
    Excel 2010, 2003
    Posts
    21

    Copy and Drag formula!!

    Hello,
    I'm trying to copy numbers 1-5 across, then two zeros, then start with 1-5 again. it's corresponding to operating days during the week. On saturday and sunday i just need them to be blank or zeros, doesn't matter. So essentially i need it to be like this:


    1 2 3 4 5 0 0 1 2 3 4 5 0 0

    But i need it to be drag-able because i will do it for months and months. Is there a formula that could make that possible? I've tried searching around and can't seem to find anything i need. Any help would be greatly appreciated!!! Thanks for looking.
    Last edited by quikrich3; 06-16-2011 at 05:32 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Copy and Drag formula!!

    quikrich3,

    You can use the following:
    =CHOOSE(IF(MOD(COLUMN()-3,7)=0,7,MOD(COLUMN()-3,7)),1,2,3,4,5,"","")

    Note:
    Be sure to change the number 3 in the COLUMN()-3 to be the one less than the column number of the cell that the formula is starting in. So in the example. the cell the formula is starting in is D1. D is the 4th letter, so column D is the 4th column. 4-1 = 3. If you were to start in column A, it would be COLUMN()-0 (or you could omit it: COLUMN() with no -#), starting in column B would be COLUMN()-1, etc.

    Hope that helps,
    ~tigeravatar

  3. #3
    Registered User
    Join Date
    04-08-2011
    Location
    Dalhart, Texas
    MS-Off Ver
    Excel 2010, 2003
    Posts
    21

    Re: Copy and Drag formula!!

    Thanks tigeravatar!! Works great! It took a minute to understand the way you had the formula set up to know what it was doing, but i appreciate it!

  4. #4
    Forum Contributor
    Join Date
    01-24-2011
    Location
    Sheppey
    MS-Off Ver
    Excel 2010
    Posts
    239

    Cool Re: Copy and Drag formula!!

    I know this is solved but the attachment shows a nice way to create a date and just add 1 so it can be incremented, the cell above shows the Day for that date and the cell below shows the day number slightly modified to return 0 for the week end. These cells can also be easily dragged across.
    Attached Files Attached Files
    Last edited by BarryTSL; 06-27-2011 at 01:49 PM.

+ 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