+ Reply to Thread
Results 1 to 8 of 8

Excel function to count + display

  1. #1
    Registered User
    Join Date
    04-26-2012
    Location
    Heusden, Belgium
    MS-Off Ver
    Excel 2010
    Posts
    5

    Excel function to count + display

    Hi everyone,

    I am looking for a function to let me administer my network licenses a little bit better.
    Please let me explain what I mean:

    On my excel workbook I have 2 sheets:
    • PC
    • Licences

    On the sheet PC, I fill in some general information about the PC and also the license keys for different programs that belong to an existing PC
    On the sheet Licenses, I fill in all the information that is linked to a license.

    When I open the license sheet, I want to know exactly who is using the licenses and how many there are in use. So the licenses sheet is only for viewing purposes and the real information in entered in the pc sheet.

    I have enclosed a xls-sheet on how I thought it would be the best way possible. The red characters must be auto updated when I change something in the licenses sheet.

    I hope you can help me with this.

    Kind regards
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Excel function to count + display

    Without adding VBA, I'd suggest having names appear one to a cell in F:K.

    In E2, then copied down:

    =COUNTIF('PC''s'!$14:$14, Licenses!C2)

    In F2, this array formula is entered:

    =IF(COLUMN(A$1)>$E2, "", INDEX('PC''s'!$E$5:$Z$5&" ("&'PC''s'!$E$4:$Z$4&")", SMALL(IF('PC''s'!$E$14:$Z$14=$C2, COLUMN('PC''s'!$E$5:$Z$5)-4,""), COLUMN(A$1))))

    ....and is confirmed by pressing CTRL-SHIFT-ENTER. This will activate the array and you will see curly braces { } appear around your formula.

    Now copy F2 to the right through K2 or so.
    Now copy F2:K2 and paste in F3:K8.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel function to count + display

    Add this code to your VB editor (ALT+F11, Insert|Module)

    Please Login or Register  to view this content.
    Then in your sheet use formula:

    Please Login or Register  to view this content.
    confirmed with CTRL+SHIFT+ENTER not just ENTER and copy down.

    You will need to adjust ranges to suit actual data, then reconfirm with CSE key combo.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    04-26-2012
    Location
    Heusden, Belgium
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Excel function to count + display

    Wow guys, thanks for the realy fast reply! I feel bad that I am unable to reply so late!!

    I just downloaded the licenses.xlsx from JBeaucaire and it worked perfectly.

    I also tried the method of NBVC, but I am unable to get it working. I saved the module, but when I want to use the formula, Excel says that the formula is wrong.
    It highlights "C2,SUBSTITUTE" in the middle of the formula. Any suggestions to get it working? I want to try both of your methods, because you did the effort to reply to my threat!

    Thanks in again for the help and quick reply! Total aces!!

    Kind regards

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel function to count + display

    Here you go. It works fine for me. I think it is because your EXCEL version uses semi-colons as argument separators. When you upload a workbook, the separators change automatically to your version.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    04-26-2012
    Location
    Heusden, Belgium
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Excel function to count + display

    Wow, thanks NBVC for the quick and correct reply!
    It's working now for me also! Maybe it's because I'm using the dutch version the formulas didn't work?

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Excel function to count + display

    Yes, as I mentioned above, your version uses semicolons instead of commas to separate the arguments in the formulas.

  8. #8
    Registered User
    Join Date
    04-26-2012
    Location
    Heusden, Belgium
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Excel function to count + display

    Ah ok, now I see! I will close this topic because everything is working now!

    Thanks again for the quick help, guys!!

    Kind regards,

+ 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