+ Reply to Thread
Results 1 to 18 of 18

Adding totals of projects in different stages by a VBA search function into dashboard

  1. #1
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Adding totals of projects in different stages by a VBA search function into dashboard

    Good Day,

    I hope this question finds you all well.

    I have a workbook where I want to create a dashboard in a proper Userform of the results of my VBA search.

    I have attached an example sheet.

    I have different sheets where projects are regularly added, updated, and removed from.

    I would like to total the amount (R) for each project gate (e.g. Pre-CRA, CRA, DRA) and the total number of projects for each project gate into a dashboard as well. The Userform will look basically like the "Dashboard" sheet I have added as the example.

    I have no idea of writing the VBA code to do the search for each row and totaling the number for the different gates.

    Your help would be highly appreciated.

    Kind Regards,
    Raymond

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    You could use this code, right click on the bottom on Dashboard sheet name, choose view code, paste the code on the bigger winbdow on the right, then click inside the code and press Play or F5 to run it:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hi Antonio,

    Thank you, I will try and let you know.

  4. #4
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hi Antonio,

    The code works like a charm. Thank you very much!

    Just one question, how would I change the code to run only on specific sheets and not all sheets in the workbook?

    thanks!

  5. #5
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hi Antonio,

    Sorry, just another question on the code.

    As per the attachment, if you want to include more filters to populate two different table how would the code change?

    In the end, I have projects that are constraint and unconstrained. I would like to split those in to two separate table as per the example.

    I already changed the code to include the "Opportunities" projects as well.

    Thank you very much!

  6. #6
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    See attacned file, I used this code:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  7. #7
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Try
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hi Jindon, thanks for your code as well. It also work great. Can you perhaps, as per the example, show me how you can code in to split the results into the two different table for unconstraint and constraint projects? It would be much appreciated.

    Antonio, thanks also for your sheet. For some reason when I run the code my excel freezes. It becomes non responsive. I assumed it worked perfectly on your side?

  9. #9
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hallo Antonio, I figured out is this piece giving me issues and I see its an issue across many forums.


    Please Login or Register  to view this content.

    I assume it would be probably more easier to add a piece of code for the unconstraint and constraint filter in Jindon's solution.
    Last edited by Raylou; 06-15-2018 at 04:21 AM.

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Try the attached
    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hi Jindon, Wow man, that is perfect! Appreciate it very much.

    Just one final question then all is solved.

    As per the my previous example sheet, is it possible to keep the order of the columns name in this order "Opportunities, Pre-CRA, CRA, DRA" ?

    Thanks!

  12. #12
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Are there always only 4 items?

  13. #13
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Yes that is correct.

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Replace "test" sub with the following
    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hi Jindon, than you so much. That is perfect. Thanks for the fast response to my questions.

    I appreciated it very much. Enjoy the weekend!


  16. #16
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hi Jindon,

    I hope this message finds you well.

    Once again thank you for assisting a few weeks ago with my code.

    I tried by using the pilot code you have send me to add to my full project sheet, but I Honestly do not know how to adjust all the code for my sheet.

    I have 4 sheets within the workbook that I would like to total in the dashboard sheet as previously. (as per the attached file)

    One problem that I also have is that the sheet called "Transmission" has additional columns to total as per the dashboard layout.

    To recap, basically like before, I would like to sort the projects between active and future projects, per gate (Opportunities, Pre-CRA, etc.), total the projects costs, the number of projects, the total MW, km, and MVA.

    I hope you would be able to help me if possible. I wish I had the experience in understanding all the code. Your assistance will make my life so much easier and will eliminate human error by doing it manually all the calculations.

    I thank you in advance.

    Kind Regards,

    Raymond

  17. #17
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,516

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Absolutely no idea about MW, Est. Peak Jobs
    Please Login or Register  to view this content.

  18. #18
    Forum Contributor
    Join Date
    10-30-2014
    Location
    Pretoria, South Africa
    MS-Off Ver
    Office 365
    Posts
    111

    Re: Adding totals of projects in different stages by a VBA search function into dashboard

    Hi Jondon,

    Thanks, for your assistance. I have used your code to run a few times by just changing the column references and then summarized all the results onto one sheet.

    Nonetheless, I managed to get the results that I wanted, although perhaps not thought the most effective and shortest way.

    Thanks!

+ 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. [SOLVED] Adding a search function in a userform
    By bruno2580 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-03-2018, 10:17 PM
  2. [SOLVED] Finding Percentage of Awarded Projects from a changing list of Projects
    By swvogt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-26-2017, 10:26 AM
  3. dashboard for projects completed
    By dougers1 in forum Excel General
    Replies: 0
    Last Post: 10-02-2016, 11:48 AM
  4. Search Drive for Excel Files with VB Projects
    By stuartgb100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2015, 07:20 PM
  5. Sum moving totals for different projects
    By poweskasebastian in forum Excel General
    Replies: 2
    Last Post: 12-31-2011, 05:30 PM
  6. Replies: 19
    Last Post: 03-02-2011, 10:16 PM
  7. Adding rows for specific projects based on ProjectPhases
    By maximpinto in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-25-2009, 07:04 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