+ Reply to Thread
Results 1 to 6 of 6

Membership database autofill

  1. #1
    Registered User
    Join Date
    06-27-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 365
    Posts
    14

    Membership database autofill

    Need some help with setting up a membership database for a sports club.

    The workbook I have made has a main sheet with the names of all members of the club, both old and new. Here is what want to do.

    On Sheet1, I have A1 is category, B1 is first name, C1 is surname, D1 is date of birth, E1 is date of departure.

    I then I have several sheets for each category. What I want to do is to autofill these based on category.

    Let's say that on Sheet1, I have some one called John Smith in category A. I want his name etc. automatically added to the sheet for category A but only if E1 (date of departure) is empty. If I change him to category B, I want him off the sheet for category A and onto the sheet for category B.

    Does this make sense and can anyone help?

    George

  2. #2
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Membership database autofill

    Hello George,

    In short, yes, you can do this with either Array Formula, normal formula with some conditions (sorting, etc), or VBA - If you have a large amount of data / have too many sheets, VBA might be your best friend.

    Other than that, can you post a small sample workbook with dummy data, showing how many sheets you have, what your data look like, and how you want it to look like?
    (copy pasta from Ford)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools

    Regards,
    Lem

  3. #3
    Registered User
    Join Date
    06-27-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 365
    Posts
    14

    Re: Membership database autofill

    Hi Lemice,

    Attached is a sample.

    So, on the sheet Blue, I want Martin, Emma, Helen and Alexander added automatically but not John, Peter, Roger and Mary and so on. If I change Kevin Barber from Green to Orange, I want him moved automatically.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Membership database autofill

    Here is your attached file with INDIRECT as the main formula, with the help of 2 helper cells and one rule to make them work:

    The 2 helper cells are right on the first row, in B1 and C1 of each sheet beside Data, returning the first row that has that category in the Data sheet, and how many rows belong to that category respectively (using simple Match and Countif)

    The formula in A3 is

    =IF(ROW()-2<=$C$1,INDIRECT("Data!"&SUBSTITUTE(ADDRESS(1,COLUMN()+1,4),1,"")&$B$1+ROW()-3),"")

    A simple check abusing ROW(), I simply check if there are still rows to take in, then take it, from the Data sheet.
    (My brain isn't working well atm so idk how to well-disect the formula, let me know if you want any particular part of the formula explained instead)

    The advantage of using INDIRECT like this is that the performance will be top-notch even in the case your data sheet goes up to ten of thousands of rows or even more.
    The downside is that, unfortunately, you have to sort Data sheet by Category.

    Alternatively, you can achieve the same results using Array Formula (Require no sorting beforehand, but will struggle if you have a large amount of data) and VBA (simply great for 99.99% of problems in Excel, but, yeah, macro, IT policies, etc)
    Attached Files Attached Files
    Last edited by Lemice; 06-14-2016 at 07:48 AM.

  5. #5
    Registered User
    Join Date
    06-27-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 365
    Posts
    14

    Re: Membership database autofill

    Thanks, but when I try to download the file, says it is corrupt.

  6. #6
    Valued Forum Contributor Lemice's Avatar
    Join Date
    04-13-2013
    Location
    Somewhere.
    MS-Off Ver
    Excel 2016
    Posts
    696

    Re: Membership database autofill

    Weird, I just tried downloading it twice, and both of them work on my end.

    Try pasting these formulas in then:

    In any sheet from 2 to 4, "Blue", "Green" and "Orange"

    B1: =MATCH($A1,Data!A1:A29,0)

    B2: =COUNTIF(Data!A2:A29,A1)

    A3: =IF(ROW()-2<=$C$1,INDIRECT("Data!"&SUBSTITUTE(ADDRESS(1,COLUMN()+1,4),1,"")&$B$1+ROW()-3),"")

    Drag the formula in A3 to C3, then drag it down until you start seeing "Blank"

+ 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. Connecting database to autofill
    By SanTai in forum Access Tables & Databases
    Replies: 6
    Last Post: 06-02-2015, 03:43 PM
  2. Hello and thanks for the membership
    By CSM1861 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-26-2014, 06:26 PM
  3. My first membership to a help board
    By jamescairns in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 07-26-2013, 10:28 PM
  4. Hi, thank you for the membership.
    By xlnovice in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 01-08-2013, 05:29 AM
  5. Please help setup membership database
    By L_O_O_M in forum Excel General
    Replies: 0
    Last Post: 09-02-2012, 07:33 AM
  6. Autofill to last row in a database
    By JOn Kunces in forum Excel General
    Replies: 2
    Last Post: 08-22-2005, 05:29 PM
  7. [SOLVED] Database-Query and AutoFill??????
    By mattse_f in forum Excel General
    Replies: 1
    Last Post: 06-30-2005, 07:05 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