worksheet-function

Count number of cells in a range that match the content of a different cell

心不动则不痛 提交于 2019-12-01 15:03:47
I am trying to use COUNTIF in Excel to find how many items in a range match the contents of a separate cell. The idea is, the range contains everyone's answers to a given question (a one-word, non-numeric answer); the comparison column contains the correct answer. I want a count of how many people got the answer correct. I tried: =COUNTIF(C16:BT16,"=BU16") But it appears COUNTIF won't let me reference a cell with the criteria in it -- it requires the match criteria directly in the formula, such as =COUNTIF(C16:BT16,"DEN") . I can do that, of course, but I'd have to edit dozens of formulas

Sum every nth rows in Excel

陌路散爱 提交于 2019-12-01 14:26:17
28 10 | 100 29 210 30 40 20 | 84 41 130 42 43 30 | 75 44 740 45 46 40 | 73 47 220 How can I sum every 3 rows A29+A41+A44+A47+... I tried various suggestions like this and this one but couldn't figured it out. In addition, is there any way to extract the second part, to a different column, of the other rows? I mean 100, 84, 75, 73, ... In a cell as a standard non-array formula, =SUM(INDEX(A29:A48*NOT(MOD(ROW($29:$48)-29, 3)), , )) The ROW($29:$48)-29 is the position within A29:A38 and must be expanded if A29:A48 is expanded. 来源: https://stackoverflow.com/questions/35664572/sum-every-nth-rows-in

Excel chart dynamic range-selection

情到浓时终转凉″ 提交于 2019-12-01 11:05:23
I have a client that has a simple yet complicated request for an excel sheet setup, and I can't for the world thing of where to start. I'm drawing a blank. We have a data range. Example: Quarter Data 2010Q1 1 2010Q2 3 2010Q3 4 2010Q4 1 I have a chart built on top of that. Change data, chart changes, protect worksheet to keep other idi... er... users from changing old data. Simple. What I want to have happen: When I add the next Q1 below Q4, the chart "automagically" selects the most recent 4Q. So when I update the data to: Quarter Data 2010Q1 1 2010Q2 3 2010Q3 4 2010Q4 1 2011Q1 7 The chart

Using conditional formatting to alternate the formatting of data by category

倖福魔咒の 提交于 2019-12-01 09:23:54
I have a spreadsheet with a bunch of rows like this: Name | ID | Category | Attributes... -------------------------------------------------------- name0 | 753 | cat1 | ... name1 | 724 | cat1 | ... name2 | 149 | cat1 | ... name3 | 265 | cat1 | ... name4 | 032 | cat2 | ... name5 | 991 | cat2 | ... name6 | 238 | cat2 | ... name7 | 005 | cat3 | ... name8 | 632 | cat3 | ... name9 | 393 | cat3 | ... And I would like to format it so it's a little bit easier to distinguish the rows of separate categories. I'd therefore like to alternate shading and not shading based on the values in the Category

How to evaluate a excel formula through XSSF event API

白昼怎懂夜的黑 提交于 2019-12-01 07:31:22
I am reading XLSX files using event API of Apache POI, i.e I read the contents of the XLSX sheet through a SAX Parser. I want to know how can we get the computed value of a formula by using XSSF event API. The way I know to do this is by using the FormulaEvaluator class. But since formulaEvaluator takes an instance of Workbook class I don't want to use this approach. (I am reading Excel files containing a million rows and 100 columns so if I create a Workbook object of that Excel my app server goes out of memory and hence I am using Event API) How can I do the evaluation in event parsing,

Using conditional formatting to alternate the formatting of data by category

南楼画角 提交于 2019-12-01 07:05:25
问题 I have a spreadsheet with a bunch of rows like this: Name | ID | Category | Attributes... -------------------------------------------------------- name0 | 753 | cat1 | ... name1 | 724 | cat1 | ... name2 | 149 | cat1 | ... name3 | 265 | cat1 | ... name4 | 032 | cat2 | ... name5 | 991 | cat2 | ... name6 | 238 | cat2 | ... name7 | 005 | cat3 | ... name8 | 632 | cat3 | ... name9 | 393 | cat3 | ... And I would like to format it so it's a little bit easier to distinguish the rows of separate

I want to sum every 7 rows in a worksheet and put the sum in different column & rows

馋奶兔 提交于 2019-12-01 05:11:31
I have never really used Excel before but this seems like it should be possible. I have an ongoing document where I will be adding values every day, but what I want it to do for every 7 rows I want it to sum those values and add the sum of the 7 rows to a different column/row, e.g., Row B7:B14 Sum in D12 Row B15:B22 Sum in D13 And then when I start adding data into B23 I want it to add the sum to D14. In D12, put =SUM(OFFSET($B$7,(ROW()-12)*8,0,8,1)) and fill down column D as far as you want. Note that B7:B14 is really 8 rows, not 7. If you really want 7 rows (B7:B13), then change the two 8's

How to evaluate a excel formula through XSSF event API

末鹿安然 提交于 2019-12-01 04:48:08
问题 I am reading XLSX files using event API of Apache POI, i.e I read the contents of the XLSX sheet through a SAX Parser. I want to know how can we get the computed value of a formula by using XSSF event API. The way I know to do this is by using the FormulaEvaluator class. But since formulaEvaluator takes an instance of Workbook class I don't want to use this approach. (I am reading Excel files containing a million rows and 100 columns so if I create a Workbook object of that Excel my app

Using OR logic on an array as argument in Sumproduct

久未见 提交于 2019-12-01 04:17:05
I'm having a fairly large dataset where I need to combine multiple entries into a single value. My dataset contains data on the combination of two datasets, each using their own ID's and keys. I thought of using a Sumproduct() function like this: =SUMPRODUCT(--('Raw data'!C:C=Landgebruik!A2);--('Raw data'!O:O={20;21;22;23;40});'Raw data'!S:S) With Landgebruik!A2 holding an ID for the first dataset, which I need to aggregate the second dataset to. 'Raw data'!O:O contains the ID's from the second dataset. In the case above I need to sum the area (in 'Raw data'!S:S ) when the value of the second

Conditional median in MS Excel

南笙酒味 提交于 2019-12-01 03:13:36
I'm trying to calculate the conditional median of a chart that looks like this: A | B ------- x | 1 x | 1 x | 3 x | y | 4 z | 5 I'm using MS Excel 2007. I am aware of the AVERAGEIF() statement, but there is no equivalent for Median. The main trick is that there are rows with no data - such as the 4th "a" above. In this case, I don't want this row considered at all in the calculations. Googling has suggested the following, but Excel won't accept the formula format (maybe because it's 2007?) =MEDIAN(IF((A:A="x")*(A:A<>"")), B:B) Excel gives an error saying there is something wrong with my