worksheet-function

How do I get the last character of a string using an Excel function?

喜你入骨 提交于 2019-12-22 03:30:25
问题 How do I get the last character of a string using an Excel function? 回答1: No need to apologize for asking a question! Try using the RIGHT function. It returns the last n characters of a string. =RIGHT(A1, 1) 回答2: =RIGHT(A1) is quite sufficient (where the string is contained in A1). Similar in nature to LEFT, Excel's RIGHT function extracts a substring from a string starting from the right-most character: SYNTAX RIGHT( text, [number_of_characters] ) Parameters or Arguments text The string that

Count paired instances where their elements are in different columns

人盡茶涼 提交于 2019-12-20 07:09:27
问题 My searches for answers have been limited by my lack of knowledge of the appropriate terminology. My goal is to count the number of times a specific username appears in one column AND the number 1 appears in another column for that user. I attempted to use COUNTIF, but it doesn't seem to format for that purpose. What I'm needing is to count the number of instances "username" appears in column K when "1" appears in column Q. 回答1: If you have =COUNTIFS (you don't mention which version of Excel)

Text encoding (converting to numeric) based on user-defined rules in Excel

痴心易碎 提交于 2019-12-20 06:36:48
问题 I have data in text form that I need to encode/convert to numeric form according to rules I defined. To clarify: Need formula for output column so that it compares original text data with text-number encoding rules and returns numeric value of text in each row. 回答1: Put this in C3 and drag down: =INDEX(F$2:F$6,MATCH(A3,E$2:E$6,0)) 来源: https://stackoverflow.com/questions/34124334/text-encoding-converting-to-numeric-based-on-user-defined-rules-in-excel

SumProduct over sets of cells (not contiguous)

时光总嘲笑我的痴心妄想 提交于 2019-12-19 19:14:52
问题 I have a total data set that is for 4 different groupings. One of the values is the average time, the other is count. For the Total I have to multiply these and then divide by the total of the count. Currently I use: =SUM(D32*D2,D94*D64,D156*D126,D218*D188)/SUM(D32,D94,D156,D218) I would rather use a SumProduct if I can to make it more readable. I tried to do: =SUMPRODUCT((D2,D64,D126,D188),(D32,D94,D156,D218))/SUM(D32,94,D156,D218) But as you can tell by my posting here, that did not work.

SumProduct over sets of cells (not contiguous)

孤街醉人 提交于 2019-12-19 19:14:34
问题 I have a total data set that is for 4 different groupings. One of the values is the average time, the other is count. For the Total I have to multiply these and then divide by the total of the count. Currently I use: =SUM(D32*D2,D94*D64,D156*D126,D218*D188)/SUM(D32,D94,D156,D218) I would rather use a SumProduct if I can to make it more readable. I tried to do: =SUMPRODUCT((D2,D64,D126,D188),(D32,D94,D156,D218))/SUM(D32,94,D156,D218) But as you can tell by my posting here, that did not work.

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

淺唱寂寞╮ 提交于 2019-12-19 12:28:13
问题 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,

Sum every nth rows in Excel

主宰稳场 提交于 2019-12-19 11:44:18
问题 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, ... 回答1: 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

Excel chart dynamic range-selection

╄→尐↘猪︶ㄣ 提交于 2019-12-19 10:14:25
问题 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

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

孤者浪人 提交于 2019-12-19 06:57:44
问题 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. 回答1: In D12, put =SUM(OFFSET($B$7,(ROW()-12)*8,0,8,1)) and fill down column D as far as you

Calculate Moving Average in Excel

雨燕双飞 提交于 2019-12-19 04:18:52
问题 I want to calculate a moving average of the last, say 20, numbers of a column. A problem is that some of the cells of the column may be empty, they should be ignored. Example: A 175 154 188 145 155 167 201 A moving average of the last three would be (155+167+201)/3. I've tried to implement this using average, offset, index, but I simply don't know how. I'm a little bit familiar with macros, so such a solution would work fine: =MovingAverage(A1;3) Thanks for any tips or solutions! 回答1: {=SUM((