+ Reply to Thread
Results 1 to 10 of 10

Calculating Percentages Based on Conditions

  1. #1
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Calculating Percentages Based on Conditions

    I think this might be a simple problem, but I'm very limited in my Excel skills.

    In the attached sample, I'm trying to get a percentage for the Class C IP's used. So, I have a total of 24 links. Many of them share the same Class C IP. I need to get the percentages.

    Not sure if I should use a SUMIF or another function.

    All help appreciated.

    Thanks
    Attached Files Attached Files
    Last edited by newbieexceldude; 10-19-2011 at 08:06 PM.

  2. #2
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Calculating Percentages Based on Conditions

    By the way, here is attachment for the desired output.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Calculating Percentages Based on Conditions

    Any ideas, guys?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Calculating Percentages Based on Conditions

    Hello newbieexceldude,

    How are you determining your percentages? I can not replicate the numbers you provided in the sample workbooks.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Calculating Percentages Based on Conditions

    Leith,

    Those aren't real numbers, just an example of what the final output should be

  6. #6
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Calculating Percentages Based on Conditions

    Looks like I might have to do this the long way

  7. #7
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Calculating Percentages Based on Conditions

    I think the issue is that we don't really understand what you're trying to do. When you say the percentage of class C IPs used is what you're after counting how many unique class C addresses appear in your list?

    If so you can do this in your original sample file using the array formula =SUM(IF(E2:E25<>E1:E24,1,0))

    Because it's an array you must use Ctrl-Shift-Enter to enter it into the cell, not just enter by itself.

  8. #8
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Calculating Percentages Based on Conditions

    I see Andrew. I apologize for the confusion. Yes, it's pretty much what you said -- calculate how many unique class C addresses appear in my list (as an overall percentage of all Class C IPs)

    I guess basically, I want to know what percentage each Class C IP contributes to the whole.

    So if I have 25 cells, and a Class C IP appears in 5 out of 25, I want the formula to return the value of 25%

    Does that make more sense?

    I'm thinking now, that this would work better with just a summary table that just outputs 1 (unique) Class C IP and the corresponding percentage
    Last edited by newbieexceldude; 10-17-2011 at 08:53 PM.

  9. #9
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Calculating Percentages Based on Conditions

    How about the attached? This is your original sample sheet with a simple summary page.

    I've used a helper column (column G on the original sheet), because it keeps the formula a lot simpler.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    06-16-2008
    Posts
    115

    Re: Calculating Percentages Based on Conditions

    That's Perfect, Andrew. Thanks so much!

+ 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