+ Reply to Thread
Results 1 to 8 of 8

Trying to fill dates with formula

  1. #1
    Registered User
    Join Date
    11-02-2022
    Location
    Montreal, Canada
    MS-Off Ver
    O365
    Posts
    22

    Trying to fill dates with formula

    I am trying to fill in the date column with multiple same dates and then change the date after a few rows.

    Column A has dates, Column B has names that repeat every day, then more columns with data. I am trying to add the dates with a formula that will add, for example, 80 same dates at a time then 80 next dates and so on for a year. I have tried to drag an entire week of dates, but it only copies the week and does not increment the dates down the column.

    I have attached a sample and here is an idea of it.

    Screenshot 2023-05-23 104358.jpg
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,858

    Re: Trying to fill dates with formula

    Here's how I tend to do something like this.

    1a) Manually enter the first date into the desired cells like you currently have in A2:A6.
    1b) In A7, enter =A2+1. Copy/paste/fill down as far as needed.
    2a) Manually enter the names to repeat like you currently have in B2:B6.
    2b) In B7, enter =B2. Copy/paste/fill down as far as needed.

    Would something like that work for you?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Trying to fill dates with formula

    Hi aferland,

    Seems like a simple If(Andre) type of formula works for this problem. See the attached.
    Andre Test Yearly Schedule.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    11-02-2022
    Location
    Montreal, Canada
    MS-Off Ver
    O365
    Posts
    22

    Re: Trying to fill dates with formula

    That if does work for the manual entry thanks.

    Now is there a way to have a list of names in a second sheet and have sheet one automatically build itself for the entire year?

    I will upload another sample that is closer to what I need
    Last edited by AliGW; 05-23-2023 at 11:50 AM. Reason: Please do NOT quote unnecessarily!

  5. #5
    Registered User
    Join Date
    11-02-2022
    Location
    Montreal, Canada
    MS-Off Ver
    O365
    Posts
    22

    Re: Trying to fill dates with formula

    here is a second sample, it's a lot closer to what I need.

    sheet 2 has the reference data for the users
    Screenshot 2023-05-23 121104.jpg

    I'm looking to build sheet 1 automatically from date1 to date2. Each user has 5 entries they can add per day, with days they don't work.
    Screenshot 2023-05-23 121317.jpg

    The Xlookups are easy, but how do i get it to build itself with the days marked in x as working days, and make sure it repeats 5 times for every user and every day?
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-02-2022
    Location
    Montreal, Canada
    MS-Off Ver
    O365
    Posts
    22

    Trying to fill dates with formula

    I will post in a new Thread since it's a different question.

    I am trying to get sheet1 of this spreadsheet to auto fill from reference data on sheet 2.

    Rules are: 1- each user has 5 entries per day
    2-Entries auto fill per the scheduled work days
    3- 2 last entries for each user/day will be tagged Extra (currently doing manually with =MOD(ROW(),4)=0, then sorting by formatting color and adding the text)
    4- I would like to be able to add a user in the Reference Data and have it show up in the first sheet completely configured

    sheet 2 has the reference data for the users
    Attachment 830670

    I'm looking to build sheet 1 automatically from date1 to date2. Each user has 5 entries they can add per day, with days they don't work.
    Attachment 830669

    The Xlookups are easy, but how do i get it to build itself with the days marked in x as working days, and make sure it repeats 5 times for every user and every day?
    Attached Images Attached Images
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,650

    Re: Trying to fill dates with formula

    This proposal utilizes Power Query.
    1. Convert the range in A1:J6 into an Excel table
    2. Add a column to count rows per day and populate using: =SUM(K1,5)
    3. Use the following Advanced Editor code in Power Query to produce the green/white table in columns M:N
    Please Login or Register  to view this content.
    4. Manually populate cell Q2 with the start date
    5. Populate Q3 and down using: =IF(COUNTIFS(Q$2:Q2,Q2)=MAX(Table1[Rows/Day]),SUM(Q2,1),Q2)
    6. Populate R2 and down using: =INDEX(Table_Table1[Name],MOD(ROWS(R$2:R2)-1,MAX(Table1[Rows/Day]))+1)
    7. Populate S2 and down using: =IF(SUMPRODUCT((Table_Table1[Day]=TEXT(Q2,"dddd"))*(Table_Table1[Name]=R2)),"","Off Shift")
    8. Populate T2 and down using: =INDEX(Table1[shift],MATCH(R2,Table1[Name],0))
    9. Populate U2 and down using: =INDEX(Table1[Manager],MATCH(R2,Table1[Name],0))
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,625

    Re: Trying to fill dates with formula

    In A3
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In B2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In C2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In D2 Copied to column E also
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 05-29-2023 at 12:49 PM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

+ 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. Need VBA Code to copy unique dates across row and fill formula to range
    By MicroTees in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-31-2023, 06:00 PM
  2. fill formula for summing dates in unique way
    By jam320 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-24-2017, 12:38 AM
  3. [SOLVED] Fill down dates overwriting times ( vba ) or by adding a helper column with formula
    By Kerryx in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-23-2016, 06:14 AM
  4. [SOLVED] Formula to fill month end dates from start date to end date
    By Barieq in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-03-2016, 11:51 AM
  5. Replies: 2
    Last Post: 10-11-2012, 04:49 PM
  6. Replies: 3
    Last Post: 02-09-2012, 06:57 PM
  7. Replies: 1
    Last Post: 05-27-2010, 12:32 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