Author Topic: Excel help needed  (Read 933 times)

Hawkmoon

  • friend
  • Senior Member
  • ***
  • Posts: 27,244
Excel help needed
« on: April 12, 2017, 04:24:26 PM »
I have a spreadsheet for tracking mass shootings. I started compiling it a couple of years ago for possible use in trying to persuade my town's government to repeal a very restrictive, anti-gun town ordinance. That attempt was a total failure -- after meeting with the full governing board plus the town attorney, the result was that, according to the Mayor, "That's all very interesting, but ... wed on't like guns."

But I keep up the spreadsheet, and I now have columns for tracking Islamist terror attacks in addition to school and other mass shootings. But I'd like to figure out formulas ("formulae"?) for keeping running totals of each column, but -- for example -- not all shootings involve Islamist terror, and not all Islamist terror attacks involve shooting. I don't know how to set up a formula to add all values in Column E where the value in Column C is "Yes," but exclude values in Column E if the corresponding value in Column C is "No" or blank.

Can anyone guide me to setting this up?
- - - - - - - - - - - - -
100% Politically Incorrect by Design

K Frame

  • friend
  • Senior Member
  • ***
  • Posts: 44,178
  • I Am Inimical
Re: Excel help needed
« Reply #1 on: April 12, 2017, 04:43:05 PM »
Uh... det cord?

I know what you're trying to do... but I don't know how to do it. I THINK you want to use a COUNTIF formula...

Try searching on COUNTIF
Carbon Monoxide, sucking the life out of idiots, 'tards, and fools since man tamed fire.

Hawkmoon

  • friend
  • Senior Member
  • ***
  • Posts: 27,244
Re: Excel help needed
« Reply #2 on: April 12, 2017, 05:19:17 PM »
Uh... det cord?

I know what you're trying to do... but I don't know how to do it. I THINK you want to use a COUNTIF formula...

Try searching on COUNTIF

That's a good one -- not what I was looking for, but possibly useful. COUNTIF will return a count of the number of incidents where I enter "Yes" for "gun-free zone" (for example), but it doesn't total the number of people killed in gun-free zones.

I'll keep studying that one. Maybe I'll find a link to related functions. Thanks.
- - - - - - - - - - - - -
100% Politically Incorrect by Design

lupinus

  • Southern Mod Trimutive Emeritus
  • friends
  • Senior Member
  • ***
  • Posts: 9,178
Re: Excel help needed
« Reply #3 on: April 12, 2017, 05:21:06 PM »
If you want a total instead of a count try sumif instead of countif


Sent from my iPhone using Tapatalk
That is all. *expletive deleted*ck you all, eat *expletive deleted*it, and die in a fire. I have considered writing here a long parting section dedicated to each poster, but I have decided, at length, against it. *expletive deleted*ck you all and Hail Satan.

K Frame

  • friend
  • Senior Member
  • ***
  • Posts: 44,178
  • I Am Inimical
Re:
« Reply #4 on: April 12, 2017, 05:39:22 PM »
You might need to use both count if and sum if depending on how you want the data to parse.

Sent from my SCH-I545 using Tapatalk
Carbon Monoxide, sucking the life out of idiots, 'tards, and fools since man tamed fire.

Hawkmoon

  • friend
  • Senior Member
  • ***
  • Posts: 27,244
Re: Excel help needed
« Reply #5 on: April 12, 2017, 08:07:21 PM »
Thank you both. I think between those two I can accomplish what I hope to do.
- - - - - - - - - - - - -
100% Politically Incorrect by Design

HeroHog

  • Technical Site Pig
  • Administrator
  • Senior Member
  • *****
  • Posts: 8,039
  • It can ALWAYS get worse!
    • FaceButt Profile
Re: Excel help needed
« Reply #6 on: April 12, 2017, 09:00:24 PM »
If ya need more help, I can show ya how to get there from here. Skype or PM and I will give ya my number or call you.
I might not last very long or be very effective but I'll be a real pain in the ass for a minute!
MOLON LABE!

Doggy Daddy

  • Poobah
  • friend
  • Senior Member
  • ***
  • Posts: 5,332
  • From the saner side of Las Vegas
Re: Excel help needed
« Reply #7 on: April 13, 2017, 08:20:10 PM »
There is also a function "SUMIFS". Note the plural.  You can have it sum a column (or range, or row,...) based on more than one criteria.  One of my favorites.  That and "VLOOKUP".
Would you exchange
a walk-on part in a war
for a lead role in a cage?
-P.F.

Hawkmoon

  • friend
  • Senior Member
  • ***
  • Posts: 27,244
Re: Excel help needed
« Reply #8 on: April 13, 2017, 08:49:45 PM »
I have used "VLOOKUP" in the past, quite effectively. My coworkers thought it was black magic -- there were literally some "How did you DO that?" comments.
- - - - - - - - - - - - -
100% Politically Incorrect by Design

Doggy Daddy

  • Poobah
  • friend
  • Senior Member
  • ***
  • Posts: 5,332
  • From the saner side of Las Vegas
Re: Excel help needed
« Reply #9 on: April 14, 2017, 12:12:09 AM »
I have used "VLOOKUP" in the past, quite effectively. My coworkers thought it was black magic -- there were literally some "How did you DO that?" comments.

If you really want to astound them, show them how to lookup to the LEFT of the column. The technique is using a compound formula with "INDEX", and "MATCH".  Use Index to declare the area to pick from, and use Match one or 2 times to select the which row in the column to reference and what column to pull the result from.  So, =INDEX(range, MATCH, MATCH).  Not the best explanation, but if you play with that structure a bit I'll bet you'll figure it out.
Would you exchange
a walk-on part in a war
for a lead role in a cage?
-P.F.