+ Reply to Thread
Results 1 to 2 of 2

Count Result in range using Primary Key

  1. #1
    Registered User
    Join Date
    06-03-2020
    Location
    Melbourne
    MS-Off Ver
    Office 365
    Posts
    1

    Count Result in range using Primary Key

    Hi all,

    Not quite sure how to express this, but at my work we have a spreadsheet where we record outcomes for people (In a legal setting). Every person is input into this spreadsheet and given a number to identify that person, and the cases they may have.

    I've attached a screenshot of some example data to give some context.
    Example.PNG

    So from above, you can see that Column A, the person is given the number of 1, the next person is allocated 2 etc etc. I'm trying to treat this number as the primary key.

    At the end of the day we currently manually count the outcomes for people, but I'm trying to automate this to save time

    What I need to try and figure out, is if there is a way to set up formulas to count relying on the Number in Column A. For example, using the Column A value and then reading in the cells in Columns U and V to count the results only for that person, and the same for Person number 2 and so on and so forth.
    In the above example, the correct result that I would need to return is that one Remand Order is made for person number one. But for a bit of added complexity, the result I need to count may not be in the first row, but could be in any other row applicable to person Number 1. In effect there are a few outcomes we can enter, Remand, Bailed, Finalised or Adjourned. Some cases can have combinations of these outcomes, and I'll need to set up a hierarchy for which outcome overrides the other for when we take our stats.

    Unfortunately the boss isn't keen on me changing the design of this spreadsheet, so I'm just trying to see if there's a way to do it without making any drastic changes.

    If anyone would have any suggestions, I'd be incredibly grateful.
    Cheers,
    Last edited by snoreasaurus; 06-03-2020 at 08:27 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: Count Result in range using Primary Key

    If you want to treat column A as a primary key then you will need to enter the person number on each row, rather than once for each block of data.

    It would also help if you attached a sample Excel workbook, rather than a picture of one. Details for how you can do this are given in the yellow banner at the top of the screen.

    Hope this helps.

    Pete

+ 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. Replies: 5
    Last Post: 05-08-2015, 12:08 PM
  2. [SOLVED] Pivot for Count and count result as percentage of another cell
    By JEA_123 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 01-22-2015, 07:54 AM
  3. Replies: 6
    Last Post: 11-13-2013, 01:40 PM
  4. [SOLVED] defining a range subset based on a primary range for use in Median and Mode functions
    By Araise in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2013, 06:39 PM
  5. [SOLVED] Count Rows Based On User Input & Trigger Print Of Pages Out Of Count Result
    By wliang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2012, 02:45 AM
  6. Replies: 4
    Last Post: 05-05-2012, 05:01 AM
  7. Primary/Secondary Axis series count
    By raydenl in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-28-2005, 04:05 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