+ Reply to Thread
Results 1 to 11 of 11

automatically updating formula when user adds a user

  1. #1
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Question automatically updating formula when user adds a user

    I have a spread sheet which I have entered a formula to calculate the percentage of users in the list that have completed a certain training.

    this works and I KNOW how to update it if a new employee enters company and needs to be added to the list, BUT the person I am creating this spread sheet for DOES NOT.

    what I need is, a formula or vba to allow me to tell excel to change the formula automatically so the end user doesn't have to.

    e.g. at the moment there are 54 employee's so I use a percentage formula like... 5/54*100 = 9% (to 1dp). which shows that 5 employees out of the CURRENT total have been trained.

    What I need is the formula to automatically update when my end user has to add to a couple of rows which makes the total employees 56. hence I need the formula to change to /56*100 to maintain the correct percentage..


    can this be done??

    I have attached simple example sheet
    Attached Files Attached Files
    Last edited by Muzza86; 04-25-2014 at 06:25 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: automatically updating formula when user adds a user

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

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: automatically updating formula when user adds a user

    One way:

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


    and another:

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



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: automatically updating formula when user adds a user

    Try:
    =COUNTIF(G4:G1000,"yes")/COUNTA($F4:$F1000)
    in K5 and
    =COUNTIF(H4:H1000,"yes")/COUNTA($F4:$F1000)
    in L5

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: automatically updating formula when user adds a user

    You don't need to use the intermediate table. You can use:

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


    or:

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



    Regards, TMS

  6. #6
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: automatically updating formula when user adds a user

    thanks guys ill try these out. appreciate it

  7. #7
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: automatically updating formula when user adds a user

    went with ragulduy

    thanks mate perfect

  8. #8
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: automatically updating formula when user adds a user

    slight issue.. as I posted this as an EXAMPLE ..your answers were perfect... however I was ignorant.

    in my real table.. the data in the cell is not "yes" and obviously this would be easy to change if it was another word.. but the data in the cells under the training column is a DATE ..and they are all different...

    see attached - ive updated it
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: automatically updating formula when user adds a user

    Try:
    =COUNTIF(G4:G1000,">0")/COUNTA($F4:$F1000)

  10. #10
    Forum Contributor
    Join Date
    04-09-2014
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: automatically updating formula when user adds a user

    legend, thank you. works

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,445

    Re: automatically updating formula when user adds a user

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Code that adds row, based on user input?
    By The Boosh! in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2011, 11:15 AM
  2. User adds a new sheet by selecting date
    By jerryjaysr in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-06-2008, 12:14 PM
  3. what Event is triggered when user adds/deletes rows?
    By dlh in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-20-2007, 08:38 PM
  4. Formula needed - automatically calculate session time totals for each user
    By optimusprym8 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-22-2006, 09:01 AM
  5. Formula needed - automatically calculate session time totals for each user
    By optimusprym8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-22-2006, 06:42 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