+ Reply to Thread
Results 1 to 9 of 9

Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

  1. #1
    Registered User
    Join Date
    04-30-2019
    Location
    Texas, USA
    MS-Off Ver
    Excel 2016
    Posts
    8

    Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

    Hello All,
    I'm hoping this is the correct forum for my query. I am working on a project where I need to be able to enter my data in one location on the "ALL DATA" sheet; then have the data entered in the sheet populate into the corresponding monthly sheets.

    For example, patients born in January ("MONTH" column D) will have their row data copied to the sheet called, "January 2019", and so on, for each patient by month. I've attached an example spreadsheet below.

    Does anyone have experience with this type of macro, or formula? (I'm a novice, so please take pity on my soul!)
    Attached Files Attached Files
    Last edited by Ndavids1; 05-06-2019 at 01:41 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,423

    Re: Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

    Please note that the formula in D5 does not need to have a range associated with it. You have:

    =TEXT(E5:E7,"mmmm")

    though it should be:

    =TEXT(E5,"mmmm")

    as the TEXT function only works on one cell (the first in the range).

    That being said, you could do this using a couple of formulae. As you have posted in the Macros forum, is it a macro that you are looking for specifically?

    Hope this helps.

    Pete

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,037

    Re: Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Registered User
    Join Date
    04-30-2019
    Location
    Texas, USA
    MS-Off Ver
    Excel 2016
    Posts
    8
    Hello Peter,

    To be honest, I didn’t know how it could be done with a formula (as I’m sure you could tell, I’m self taught-badly). I appreciate your feedback on my formula in Row D; I will correct that. I would ideally like to use a formula, should I report in another forum?

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,423

    Re: Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

    I've set this up for you in the attached file.

    I've used column N in all the sheets as a helper column (coloured blue). In the ALL DATA sheet I've used this formula in cell N5:

    =IF(E5="","-",MONTH(E5)&"_"&COUNTIF(D$5:D5,D5))

    and copied this down to the bottom of your table (the hyphens helps to show where the formula is active). This identifies the month of the birth, and gives you a unique sequential reference for each record (although you only have 3 example records, and each are in a different month, so this is not so obvious until you add more data).

    In N4 of each of the monthly sheets I have used this formula:

    =MONTH(DATEVALUE("1"&RIGHT(B2,LEN(B2)-FIND("-",B2))))

    which returns the month number for the sheet, by looking at the heading. You could just as easily put the month number in this cell. In N5 I have used this formula:

    =IFERROR(MATCH($N$4&"_"&ROWS($1:1),'ALL DATA'!$N:$N,0),"-")

    which I have copied down to cell N14 in the January sheet. This tells you which row in the ALL DATA sheet that the appropriate record can be found, or returns a hyphen if no record is found. I then copied the formulae from N4:N14 into N4 of the other monthly sheets, but you might need to copy the formula down further for some of the months, as your table sizes vary.

    Then you can put this formula in A5 of the January sheet:

    =IF(OR($N5="",$N5="-"),"",INDEX('ALL DATA'!A:A,$N5))

    and this can be copied across into B5:L5. The date of birth column (E) will need to be formatted as a date, then the formulae from A5:L5 can be copied down (to row 14 in the attached example.

    I then copied that block of formulae (A5:L14) into all the other sheets, although as I said before your table sizes vary so the formulae are only present in the first 10 rows of each table - copy them down further if necessary.

    If you put some dummy data in the ALL DATA sheet to test it out, you will see the effects automatically in the monthly sheets.

    Hope this helps.

    Pete
    Attached Files Attached Files

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,037

    Re: Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

    Mis-posted.

  7. #7
    Registered User
    Join Date
    04-30-2019
    Location
    Texas, USA
    MS-Off Ver
    Excel 2016
    Posts
    8

    Re: Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

    You are a GENIUS. This is exactly what I was looking for. I apologize I mis-posted. This is my first time on the forum, and I didn't think this operation could be done with formulas. Please accept my humble apology, and know how grateful I am to all the helpful responses.

    Thank you again.

  8. #8
    Registered User
    Join Date
    04-30-2019
    Location
    Texas, USA
    MS-Off Ver
    Excel 2016
    Posts
    8

    Re: Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

    Hello Mumps,
    Thank you for your response. I ran the macro, but I couldn't get it to produce the results I was looking for (this likely speaks more to my comfort level with macros than your skills with them). I believe I will use embedded formulas in the sheets. Thank you so much for your advice and contribution towards a solution.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,423

    Re: Auto-Populate Monthly tabs from based upon data entered on aggregate data sheet

    I've been away for a couple of days, so I'm glad to hear that it worked for you.

    Thanks for the rep.

    Pete

+ 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. Auto Populate A Cell Based On Data Entered into Two Possible Cells.
    By Angry Robot in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-21-2017, 02:11 AM
  2. Auto populate based on matched data from other sheet
    By ikhan99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2016, 10:49 AM
  3. [SOLVED] VBA to Auto Populate the “AutoPopulate” sheet as data is being entered in EnterData sheet
    By bjnockle in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-13-2014, 09:10 AM
  4. Auto Populate Two Columns Based On Data Entered Into Another Column
    By aleenah in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-12-2013, 08:37 PM
  5. [SOLVED] Auto populate fields based on data in a drop down box from a second sheet
    By Grazzio in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-28-2012, 10:34 AM
  6. Auto –populate data from one sheet to another based on month
    By Roadrunner17 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-10-2012, 05:44 PM
  7. Auto-populate cells based on data from another sheet
    By tmartin1313 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-16-2011, 12:15 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