Tuesday, September 25, 2012

yogi_Tally Whether Congressmen Vote For A Particular Bill And Turn their Votes Into 1s And 0s

Yogi Anand, D.Eng, P.E.      Google Spreadsheet   Post  #778  Sep 25, 2012    www.energyefficientbuild.com.

user Greg Feresntein said: (http://productforums.google.com/forum/?zx=63d4ber84sra#!category-topic/docs/spreadsheets/ugkepH--cGs
Data Count Help
I'm tallying whether congressmen vote for a particular bill and I need a way to turn their votes into 1s and 0s. The data I have represents the congressmen by name, and I want to create a unique row for each one, where columns are bill votes and rows are the congressman's unique record.

Here's the layout I want:

Column A: Names (Tom, Dick, Harry)
Column B: Education Bill (1, if tom votes, 0, if he votes against)
Column C: Bill #3....

Here's the layout I have:

Column A: Name
Column B: Bill #1 - voted for, listed by name
Column C: Bill #1 - voted against
Column D: Bill #2 -...

I need it to be flexible enough that I can add in bills as they come up. Right now, what I'm doing is placing all the names in the first column, and running a CountIf(A:B, A1)-1 for each bill, which tallies whether there's a name in the Bill column that matches the name column. But, this is combersom and is causing problems when I add bills. 

I'm hopeful there's a better way. Thanks!!
following is my convoluted solution to mimic what I understood Greg wanted in terms of layout ... just for getting the count of For and Against the layout does not have to be this convoluted