+ Reply to Thread
Results 1 to 11 of 11

Userform code

  1. #1
    Registered User
    Join Date
    08-16-2011
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Userform code

    Sorry If i am in the wrong area or wrong post, I'll gladly move it if I need to, I am new!
    I have looked through other post and I have found some relevant information but I am unable to make it my own, I have been trying for days. I need help!

    There is probably a much easier way to do this.

    I am creating a workbook that houses trending metrical information for each sales person.
    I am also creating a master file where I can look at the entire team by filtering the data.

    In this master file I have the following headers across the columns

    a1 b1 c1 d1 e1 f1 g1
    Name / Month/ Metric / Variance / Next Tier/ Weighted Increase/ Weighted Tier Ratio

    I have each agents name listed 5 times, as there are 5 different metrics.
    All of this information is pulled from an individual agents sheet, which has additional information that is not important for the master file.

    I need to create a user form where- when the name and month are selected from a drop down box the additional months data will be put in the appropriate category.... more than willing to put the data a different way if it helps, but currently I have 5 metric categories that i need to be able to update after selecting the month and agents name, and I would like all of this to dump in the same file.

    So…It would say

    Name: [combo box]
    Month [combo box]
    Metric 1 (txt box)
    Metric 2 (txt box)
    Metric 3 (txt box)
    Metric 4 (txt box)
    Metric 5 (txt box)

    Save (command button)
    Close (command button)

    And this would know to put it in the correct cell...

    If its easier to have this information dumped directly into the particular agents spreadsheet and correct cell… I am all ears because I can easily have that dump into a different sheet.

    The format on their individual sheets is as follows
    Sheet1
    B3 = Januarry
    B5 = Metric 1
    B6 = Metric 2
    B7 = Metric 3
    B8 = Metric 4
    B9 = Metric 5

    +4 cell increase for each change in month
    Sheet1
    F3 = February
    F5 = Metric 1
    F6 = Metric 2
    F7 = Metric 3
    F8 = Metric 4
    F9 = Metric 5

    But there is about 20 agents with 12 months and that is what is making it difficult for me.

    Any help would be appreciated!
    Last edited by ytrehguodleinad; 08-16-2011 at 01:14 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: user form code trouble

    hi, ytrehguodleinad, can you post sample workbook showing original data and result you need to obtain?

  3. #3
    Registered User
    Join Date
    08-16-2011
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: user form code trouble

    I created an example file with what I am looking for, I am basically done gathering the information ytd for the group, its creating a user form to allow others to input it and go to the correct place is my struggle,

    also I included something on the first page, I am having trouble with having the first sheet pull from the additional sheets based upon the month selected, I typically use if statements but in this case there are more than seven months.

    Any help would be appreciated.
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: user form code trouble

    hi, ytrehguodleinad,

    1. Re: pulling data from each agent sheet, check attachment, run code "test".

    2. Re: putting agent's metrics through userform, what's the point to make it through userform manually? You can create a sheet with "raw" data of all the agents for update, the code will put it correctly to every agent list. If it's acceptable, please post how that info may look like.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-16-2011
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: user form code trouble

    Attached is my updated example using the macro you created, which was excellent. It worked perfectly no matter how many different sheets I added (This is important as people come and go) However, when I made a master sheet per your request, the macro came back with an error. It is important that I be able to add additional sheets and subtract as people come and go. The new sheet is trending information, I would like the user form to input into this specific sheet depending on the agents name and the month selected, then they could input the data and hit save. This would then push to their individual sheets. ( right now I have it set that the opposite flow is occurring for a visual representation. The reason I need this is that some of the users of this will not be comfortable inputting into the proper cells. I think after viewing what I did you will understand exactly what I am trying to do. Any help would be appreciated.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: user form code trouble

    please check attachment, the code has been revised. If it's OK will add userform
    Attached Files Attached Files

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: user form code trouble

    userform added
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-16-2011
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Userform code

    This is exactly what I wanted. You are fantastic. The only issue I am having is when I input the numbers its not allowing me to put in a %. If i format the receiving cells as a percentage it makes 100% 10000% etc. Is there a way around this?

    Thanks!

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Userform code

    please check attachment. If values that can be entered are limited from 0 to 100, the code should be amended to take it into the account
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    08-16-2011
    Location
    Philadelphia, PA
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Userform code

    You are the best, thank you so much for all of your assistance on this, this is perfect. If i come across any struggles with this I will reach out to you.

  11. #11
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Userform code

    ok, if you are happy with the outcome, please mark the thread as solved (see Forum Rules: http://www.excelforum.com/forum-rule...rum-rules.html for details)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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