#1
|
|||
|
|||
Formula Help
Trying to build a formula that will return the value of a range of fields if the data in another range of fields is equal to specific text.
For example I want the sum of all fields in range F2:F214 if C2:C214 = "LSP" Can anyone help? Everything I try does not work. |
#2
|
||||
|
||||
Hi and welcome perhaps = SUMPRODUCT((C2:C214="LSP")*F2:F214)
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
There's more than one way to skin this cat.
=SUMIF(F2:F214,"LSP",C2:C214) Another way to do it, and somewhat more elegantly, is to Format As Table (Home tab). Make sure you check "My table has headers". This automatically formats the table according to whichever preset you choose. But more importantly, it creates a named table range allowing so much more functionality that I do it routinely with every table I make. Once that is done, with a cell within the table selected, a new tab (Table Tools|Design) appears. In Table Style Options, click the checkbox for Total Row. This automatically adds a row to the bottom of the table. The leftmost cell will automatically have "Total" in it and another will have a calculation. You can easily change these to suit your needs. You will notice a "drop down" arrow when you select any of these cells. Click it and you will get a drop down box listing several functions you can use, including count, sum, min, max, etc. Beneath the counts (your column C), select Sum. Also, filtering is automatically setup for the table. As in the totals row, you will notice a "drop down" arrows in each of the header cells. Click it and you will see all kinds of filtering operations. If besides "LSP" you have "ABC", you can then deselect "ABC" and click OK. You will notice that your totals row calculations have automatically updated to total just those items you filtered for i.e. "LSP". You can imagine what kind of flexibility you now have. You can filter over several values, filter over various text values (Begins with, ends with, etc.). If the field you're filtering has dates in it, that opens up other filtering options (this month, last week, before, etc.). If your field has numbers, there are number filters too (greater than, top 10, etc.) You can also set up a pivot table easily to give you all kinds of summary information. In Table Design, click on Summarize with PivotTable and play around with it. See attached file for what I worked on. |
Tags |
excel 2010, formula |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
WHEN formula | agent007 | Excel | 5 | 02-06-2014 09:20 PM |
What formula should I use? | TotalONE | Excel | 3 | 11-26-2013 01:30 PM |
help with formula? | doczilla | Excel | 2 | 09-25-2011 04:14 PM |
PMT Formula | OneOleGuy | Excel | 4 | 03-05-2011 09:54 AM |
If formula | sixhobbits | Excel | 1 | 10-02-2009 08:02 AM |