+ Reply to Thread
Results 1 to 31 of 31

Update Dasboard using VBA.

  1. #1
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Update Dasboard using VBA.

    Jason says a very humble hello to all. This is my first ever post on this forum and the very first assignment I got in my new job!

    I’ve been given a responsibility to develop a report that will be used daily by the management. I was hoping to get some VBA help to be able to automatically generate it.

    I use formulas like sumif, sumifs, count, vlookup etc but it is taking considerably long due to a major challenge that the names in the 3-4 sources are not very much aligned and or there are multiple ways in which the name is available but that needs to be aligned to a unique one. Thusfar I’ve worked and created a Related name sheet (last tab of the sample attached) that is to be the basis and use formulas which chucks of lot of my time

    My request explanation is available in Tab 1 while the Dashboard I wanted to update along with the expected result in Tab 2. The other data sources are also in Tab 3, 4 & 5.

    Could any of the esteemed experts assist me on this please…

    Please forgive me in case I do anything which isn’t correct.

    Warmest regards,
    Jason (aka avid2xl)
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    re: Update Dasboard using VBA.

    i can do it for you...........but will you tell me that


    this is your final working or you will add some more name in your project?

    Regards
    CA Mahaveer Somani

  3. #3
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    This is just the sample. I currently have a 1000 names or so and they will increase over time. It has to be as dynamic as it can be.

    Thank you!

  4. #4
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    re: Update Dasboard using VBA.

    one more thing i will create a macro for you but you have to make related sheet your self......

    Regards
    CA Mahaveer Somani

  5. #5
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    Yes, technically speaking I'll be adding / deleteing data daily including Related sheet.

  6. #6
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    Good day Mahaveer!

    Hope you are doing great!

    Please let me know in case you have any questions or need any clarification on my request.

    Thanks a lot for your assistance!

    Best regards,
    Jason (aka avid2xl)

  7. #7
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    I understand it is a Saturday, but any chance I can get any help on this today.

    Sorry in case I’m being impatient. This is my first post and assignment so very keen to accomplish it.
    Best regards,
    Jason (aka avid2xl)

  8. #8
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    Bump no response Help please!

  9. #9
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    re: Update Dasboard using VBA.

    Hi Jason,
    try it (not clear with columns R & S)
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    Dearest Nilem,

    This is superb, mind blowing, out of this world. Thanks a ton

    From what I've tested thus far it is all good. A couple of things:

    Can the VLOOKUP in Column B and C be added in the code. This will ensure that I don't need to drag it every time. My data is immensely usage. with it increasing by every day

    Please refer to my post 11 for explanation on the requested output for Columns R & S

    Also can you please add something in the code to clear the data from the dashboard before every run.

    Thanks a lot.
    Last edited by avid2xl; 04-21-2013 at 05:34 AM.

  11. #11
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    Explanation on the requested output for Columns R & S:

    Report 3 - For every single rep in Column O

    Condition 1: If Column D = Bad
    Condition 2: If Column X = Benefit

    Divide the count of Pending (in Column AA) by 2 for the rep (column O) and add it to the Fixed count.

    Let's take an example:

    If Cynthia's original Fixed and Pending count is 4 each. But if the above condition becomes applicable the data in R & S given that 4 Bad (in column D) and 4 Benefit in (column X) should be updated as follows:

    4 Bad in column D along with Benefit as the status in column X divided by 2 = 2

    New result should be R = 6 and S = 2. Technically speaking if the above 2 conditions are met then the Fixed count is increased by adding 50% of the Pending ones to it.

    Hope this makes it more clear!
    Last edited by avid2xl; 04-21-2013 at 06:03 AM.

  12. #12
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    re: Update Dasboard using VBA.

    Jason, it would be better if you show file with some examples of "Bad" and "Benefit" for some "RepNames" and fill columns R and S respectively

  13. #13
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    Sure, give me sometime and I'll post a sheet with some examples. All I need is to divide the pending count by 2 wherever the 2 conditions stated above are met and add the 50% of it to Fixed in columns R and leaving the other 50% in S.

    Thanks!

  14. #14
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    re: Update Dasboard using VBA.

    Here's the file with some modified data and the much needed result in Columns R & S highlighted in yellow of the Dashboard. Please refer to the Report 3:

    Column D has the BAD
    Column O has the Rep name
    Column X has Benefit
    Column AA has the result = Fixed or Pending

    Hope this makes it all clear. Thanks you and sorry for any confusion!

  15. #15
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    re: Update Dasboard using VBA.

    Hi Jason,
    try it
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Thanks a ton. I'm testing it now. Will let you know in a bit if there are any issues. I doubt there would be any. Thanks for this immense help!

  17. #17
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Dear Nilem,

    Awesome is a very less word to define what you’ve helped me with.

    During my several tests today 2-things that I came up and request your expertise are:

    These are new observations / challanges. The solution you supplied is just too good.



    Related Tab: I notice there were some reps that were not available on this tab, but there is a data for them on either Report 1, 2 or 3. I’m not able to identify such cases. This is something to do with my data. There are huge number of them getting added and a chance of these getting missed. To counter this..

    1. Is it somehow possible to add a logic to the code that can pick such cases from Report 1, 2 and 3 and paste them in a separate tab and say Not available in Related? It would be immensely helpful.
    2. Lastly, there are several columns on the Dashboard (F, G, J, K, L, M and N). Can the code somehow drag these formula to the last line of data after the macro is run (similar to what is being done for vlookup column B and C).

    Other than this every bit of it is working “Perfectly”

    Appreciate the help!

  18. #18
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Update Dasboard using VBA.

    Hi Jason,

    Okay, here is a version number 3
    • Do not delete the line 4 on a sheet "Dashboard" (the formulas used in this row to be copied to the bottom lines)
    • To "Not available in Related" see column G on sheet "Related"
    There is one limitation: the number of unique names in column A sheet "Dashboard" should not be more than 65,000 (the same applies to column G worksheet "Related")
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Fantastic !! Thanks a bunch for all this. You are simple amazing…

    I’ll do a final round of run on this tomorrow and get back. This will surely make my life simple and avoid losing unnecessary time.

    What a solution…I’m speechless. Thank you!

  20. #20
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Simply beautiful if I can say the least!

    2 minor observations. Okay if these can't be done, but thought to check:

    The missing ones that are getting pointed out in Column G. Can these tend to appear only once if they are missing from a report. What is currently happening say if a rep Jason has 10 entries in Report 1. He is appearing 10. Ideally I would only need his name once for identification purpose, but if he is also missing in 2 and 3 then it should be pointed out once per report. Also the report name can be moved to Column H. It is currently appearing as Jason-Report1. I would prefer having it as Jason in G and Report1 in H.

    Lastly, can these missing ones also automatically get added to Column A of related, but do remain in G as well.

    My last test is in progress, and my next step would be to close this thread. It has been solved to utmost perfection. Never imagined people help like this. I'm absolutely delighted and humbled for this help by you Nilem!

  21. #21
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Ooops one more thing can a trim function be added to remove unwanted spaces before and after the names being used for mapping across the 3 reports. This I suspect is creating an unmatched entry. Juts because there is a space before or after the name.

    Sorry to trouble you so much. Hope you'll understand!
    Last edited by avid2xl; 04-22-2013 at 11:32 PM.

  22. #22
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Update Dasboard using VBA.

    version 4
    uncomment this line in the code to automatically get added to Column A of related
    Please Login or Register  to view this content.
    I think this line is not needed
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Simply WOW! I'm so sure of how this is going to worl flawlessly that this last version is going live. I'm would like to extend a humble thank you and for making experience of my first post so GOOD:-)

    Greatly, thankful!

  24. #24
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Update Dasboard using VBA.

    Пожалуйста

    (You are welcome!)
    Last edited by nilem; 04-23-2013 at 02:59 AM.

  25. #25
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    What does this mean? I know only english. Sorry!

    Can I add you as a friend?

  26. #26
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Ohh...Got it. Thought as much You are a superstar!!!!

  27. #27
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Dear Nilem,

    Trust you are doing great!

    I need a little advise due to an unexpected twist in the last bit of my request where we were giving a benefit of 50%.

    The only thing that is required is to be able to ROUNDUP.

    Example: If there are 3 Pending. Going by the logic it should be 3/2 = 1.5 and the final values should be rounded-up i.e. 3 Pendings should become 2 Fixed and 1 should stay as Pending, as against earlier where it was getting updated as 1 Fixed and 2 Pending.

    Sorry to trouble you but the authorities just changed the scope and hence the change.

    Where exactly and what change will be need to made please advise.

    Thanks a million!

  28. #28
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Update Dasboard using VBA.

    Hi Jason,
    let's try this:
    Find this line in the code
    Please Login or Register  to view this content.
    and replace it with this line
    Please Login or Register  to view this content.

  29. #29
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Awesome, thanks! I'll try and let you know if there are any issues.

  30. #30
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Quote Originally Posted by avid2xl View Post
    Dear Nilem,

    Trust you are doing great!

    I need a little advise due to an unexpected twist in the last bit of my request where we were giving a benefit of 50%.

    The only thing that is required is to be able to ROUNDUP.

    Example: If there are 3 Pending. Going by the logic it should be 3/2 = 1.5 and the final values should be rounded-up i.e. 3 Pendings should become 2 Fixed and 1 should stay as Pending, as against earlier where it was getting updated as 1 Fixed and 2 Pending.

    Sorry to trouble you but the authorities just changed the scope and hence the change.

    Where exactly and what change will be need to made please advise.

    Thanks a million!
    Dear Nilem,

    In the above scenario while running the report today I dicovered everything was happening as expected other than cases where there was just 1 pending. It was not getting converted into Fixed after. Applying the 50% logic.

    Could you please advise of the change I should make in your fantastic script to ensure that gets calculated correctly.

    Sorry for the trouble and thank you!

    Jason

  31. #31
    Registered User
    Join Date
    04-13-2013
    Location
    UK
    MS-Off Ver
    Excel 2007 / Excel 2010
    Posts
    51

    Re: Update Dasboard using VBA.

    Dearest Nilem,

    I await your kind help on this. Please help me!

    Thanks and sorry for trouble.

    Regards,
    Jason

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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