+ Reply to Thread
Results 1 to 6 of 6

Counting Repeat Occurances Using a Helper Column

  1. #1
    Registered User
    Join Date
    11-12-2018
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    7

    Counting Repeat Occurances Using a Helper Column

    Hello, for my thesis I have a large amount of data to analyse. I could do this step manually, however its a lot of data in the actual file so would be very time consuming (Edit: and there will be a lot of opportunity for human error).

    My Poroblem:
    I want to count the number of re-elections so I can talk about how tolerant a nation is of its governing party post ww2. To do this I want to count how many times a party is re-elected. (Sheet 2 in the yellow).


    My solution:
    Using a helper, is it possible to count repeat values from either sheet1's data set or sheet3's data set (COUNTIFS?). Then in cells B3:B12 could a 1- function be used to give the answers where if the answer is -1, "" or 0 is displayed?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: Counting Repeat Occurances Using a Helper Column

    Sheet 3 data is not properly pasted into the sheet. But look at sheet 1. Is your expected result correct? Shouldn't it be: 1, 1, 2, 1 ??
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    11-12-2018
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    7

    Re: Counting Repeat Occurances Using a Helper Column

    I have attached a corrected version.

    Also yes, it should be 1, 2, 1... because its re'elections. so to be counted as a re-election you need to already be in power. so basically re-elections only count when Sheet3!A4=Sheet3!A3 and when A5=A4. If A5 does not =A4 then someone new is in power and it is not a re-election.

    Thanks for helping me, I really appreciate it.

    edit:

    Republican
    Republican - here
    Democrate

    This example would be 1 republican re-election.

    Republican
    Democrat
    Republican
    Democrat

    This example would have 0 re-elections.
    Last edited by Round_Sphere; 11-12-2018 at 10:40 AM.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,139

    Re: Counting Repeat Occurances Using a Helper Column

    This one is causing a bit of brain-pain...

  5. #5
    Registered User
    Join Date
    11-12-2018
    Location
    London, England
    MS-Off Ver
    2017
    Posts
    7

    Re: Counting Repeat Occurances Using a Helper Column

    I have come up with a highly ineffient helper table.. the main problem is how each country would require its own helper table. If there are 6 reelections, I need 6 helpers in this table too.

    Not sure how to adjust it or how to use the helper to help.. sorry im really new to excel.
    Last edited by Round_Sphere; 11-12-2018 at 11:04 AM.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,643

    Re: Counting Repeat Occurances Using a Helper Column

    Put the following formula in F3 on Sheet 3 then drag the fill handle down to F22: =IF(OR(E2="helper",E3=1),"",SUM(E$2:E2)-SUM(F$2:F2))
    Also populate column B on sheet2 using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Sort by helper column even if values in helper are alike
    By NoSleepForMe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-10-2016, 04:14 AM
  2. Creating unique id's for repeat occurances
    By Nickyh1984 in forum Excel Formulas & Functions
    Replies: 23
    Last Post: 06-05-2014, 06:03 PM
  3. Counting the number of occurances of a word in a column of variable length
    By midoop in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2013, 10:58 AM
  4. Replies: 5
    Last Post: 05-11-2012, 03:38 AM
  5. Counting number of occurances in one coloumn to another column
    By hopkinsii in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-20-2011, 05:41 PM
  6. Counting occurances in a column
    By andy taylor in forum Excel General
    Replies: 5
    Last Post: 03-19-2008, 07:59 AM
  7. Counting occurances in a column
    By booge in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-23-2005, 02:10 PM

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