+ Reply to Thread
Results 1 to 9 of 9

Auto populating

  1. #1
    Registered User
    Join Date
    12-16-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    41

    Auto populating

    Hello,

    I currently have a spreadsheet that automatically populates the day and month columns once the first day is input. The columns auto populate for 24 cells (same value in each cell) and then a new day must be entered.

    I would like to have the columns "Shift" and "Time" also auto-populate based on input in the "Day" column. The shift will always have 8 of each in the following order: 3rd, 1st, 2nd. And the corresponding time will also never change.

    Attached is a spreadsheet to further illustrate. If possible, it would be great to have the data pivot-friendly. Currently I'm struggling with the "Month" column because it is simply equal to the day column with different formatting. When I attempt to utilize the month column in a pivot table, it provides me with each unique day in that month as opposed to the general month itself.

    Autopopulate.xlsx

    Thanks in advance!

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Auto populating

    I suggest that you change the format of column A to mmmm d, yyyy and delete column B. Column A will then present the Day as January 2, 2014 and this will work well with a Pivot table.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Registered User
    Join Date
    12-16-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Auto populating

    Quote Originally Posted by newdoverman View Post
    I suggest that you change the format of column A to mmmm d, yyyy and delete column B. Column A will then present the Day as January 2, 2014 and this will work well with a Pivot table.
    Thanks for the suggestion. I would still like to be able to filter the data by month in the pivot table and deleting column B prevents that.

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Auto populating

    If you use full dates, you should be able to filter by years, months, days. I do it all the time with my data. Right now when you enter the month and day, you are only entering a partial date. Add the year.

    The method that you have of creating your dates is a problem. I copied the data from columns C and D to sheet 2 and re-created the dates normally and also created a Pivot table that could group the dates by year, month, day etc.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    12-16-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Auto populating

    Great, thanks. Any idea for the bigger problem I'm running into?

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Auto populating

    I would just copy the data in columns C and D down the page seeing that they will never change. Then all you have is the date entry. You can enter the date in the first cell for the date then select that cell and extent the selection to the end of the day and use Ctrl + Down arrow to fill in the date. Or use Ctrl + ; to enter today's date and copy it down using the above method.

  7. #7
    Registered User
    Join Date
    12-16-2013
    Location
    Florida
    MS-Off Ver
    Excel 2010
    Posts
    41

    Re: Auto populating

    Yeah, that was my original intent; however, long, preexisting columns of data aren't very aesthetically pleasing and I think having the shift and time auto-populate would be favored by the user. I've been fooling around with it for some time now and just can't figure out how to do it!

    Also, in regard to your pivot table, how did you get each line to be flush without gaps?! You're a wizard!
    Last edited by jorjacman; 01-02-2014 at 03:35 PM.

  8. #8
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Auto populating

    Click in the Pivot Table. The Pivot Table tools will appear in the ribbon. Click on the Design tab. At the other end of the ribbon is Subtotals, click on that and click on Do Not Show Subtotals.

    It is also easier, I think, to read the Pivot Table if you click on Report Layout and choose Show in Tabular Form.

    I will do a little more tinkering around with your example to see if I can get something workable for you.

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Auto populating

    I have been working with your original data. I changed it to a table and added a column which is now Column C which you can hide if you like. I recorded a macro that will copy a copy of your original setup + the added column and the blank "template" is added to the bottom of your data ready for the date to be entered. Don't delete the data that is in the table just change the date then you should be ready to go. Click the button and the macro will run leaving the cursor in the first available cell for the date to be entered for new data.

    This is about all that I can do in this area. Someone conversant in VBA would certainly be able to make the macro better.
    Attached Files Attached Files

+ 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. [SOLVED] Cell not auto-locking after auto-populating
    By Hillster in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-13-2012, 10:23 AM
  2. Excel 2007 : Auto Populating cells
    By Gary Evans in forum Excel General
    Replies: 1
    Last Post: 11-23-2011, 04:17 AM
  3. Auto Populating Fields
    By dlhslim in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2011, 03:46 PM
  4. Auto Populating A Cell
    By whensley in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-23-2011, 11:10 AM
  5. Auto populating cells
    By hnnn in forum Excel General
    Replies: 7
    Last Post: 11-04-2010, 06:29 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