+ Reply to Thread
Results 1 to 2 of 2

Function to Count number of Programs with Sub-Programs

  1. #1
    Registered User
    Join Date
    06-14-2017
    Location
    Atlanta,
    MS-Off Ver
    Microsoft Excel 2016 MSO
    Posts
    56

    Function to Count number of Programs with Sub-Programs

    Hey guys, thanks in advance for the help. Here's what I'm trying to do. I'm trying to write a function in Excel that counts the number of programs to which an individual contributes. There are three programs and an individual can work on any or all of them. That's basically a simple CountA function. The difficulty is that program three has four different components. However, since the four components are really only 1 program, I want the code to count a person working on any or all of Program 3's four components as 1. The maximum number of programs any individual can work on is 3.

    I'm attaching a screenshot of excel with the function I have already written for easier reference. I just removed the = sign so you can read the code.

    Excel Help 1.png

    The function I wrote works fine for Tom and Di*k but does not work for Harry. Right now it's returning a value of 2 for Harry, which is ridiculous since there is only 1 program Harry works on. The correct values should be: Tom = 3, Di*K = 2, and Harry = 1

    Thanks again in advance! Its my first time trying to use if, and, and or functions in excel. Sorry the screenshot is so huge!
    Last edited by UHD; 06-14-2017 at 11:13 AM.

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2505
    Posts
    1,523

    Re: Function to Count number of Programs with Sub-Programs

    I would suggest the following:

    Use I as a help column, so I5=COUNTA(E5:H5)
    J5=IF(COUNTA(E5:H5)=0,COUNTA(C5:D5),COUNTA(C5,D5,I5))

+ 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. xls to exe programs
    By gloria in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-10-2009, 05:22 AM
  2. can macros be run across programs
    By yhlin in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-20-2007, 02:44 PM
  3. Excel Programs
    By paulwhyte in forum Excel General
    Replies: 16
    Last Post: 09-08-2006, 01:53 PM
  4. Deleting VBA programs
    By paulrm906 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-17-2005, 07:10 PM
  5. Deleting VBA programs
    By paulrm906 in forum Excel General
    Replies: 2
    Last Post: 12-16-2005, 12:10 PM
  6. [SOLVED] Accessing other programs through VBA
    By J Streger in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-05-2005, 04:05 PM
  7. [SOLVED] Dueling programs
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2005, 09:05 PM
  8. VBA programs
    By cvnweb@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-05-2005, 07:05 AM

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