excel-formula

Excel Formula: Count Unique Values in a Row Based on Corresponding Value in Another Row

让人想犯罪 __ 提交于 2020-02-06 03:28:44
问题 I've been trying to get this one for quite a while and I've tried a few different approaches and can't get the result I'm looking for with any of them. I have a dataset similar to the below in Excel (apologize for the formatting, I can't yet post images): Manager 1 Manager 1 Manager 2 Manager 2 Issuer 1 0 0 0 0 Issuer 2 100 100 0 100 Issuer 3 100 0 100 0 Issuer 4 0 0 0 0 I'm trying to count the number of unique Issuers associated with each Manager ("associated" being defined as having a value

Excel Formula: Count Unique Values in a Row Based on Corresponding Value in Another Row

江枫思渺然 提交于 2020-02-06 03:28:09
问题 I've been trying to get this one for quite a while and I've tried a few different approaches and can't get the result I'm looking for with any of them. I have a dataset similar to the below in Excel (apologize for the formatting, I can't yet post images): Manager 1 Manager 1 Manager 2 Manager 2 Issuer 1 0 0 0 0 Issuer 2 100 100 0 100 Issuer 3 100 0 100 0 Issuer 4 0 0 0 0 I'm trying to count the number of unique Issuers associated with each Manager ("associated" being defined as having a value

openpyxl read formula value without changing formula

℡╲_俬逩灬. 提交于 2020-02-05 03:37:12
问题 I want to read the formula value in an xlsx file, write the value in another cell and store the xlsx file. I'm using the data_only mode excelDoc = openpyxl.load_workbook(clientFile, data_only=True) to read the formula value. But when I save the file all formulas are overriden by their values. How can I prevent that? 回答1: You can't. You can either have the values or the formulae. 来源: https://stackoverflow.com/questions/40000170/openpyxl-read-formula-value-without-changing-formula

Compare two ranges in excel (not to be compared linearly)

拜拜、爱过 提交于 2020-02-04 01:36:19
问题 I've got two ranges in excel. I need to do the following: 1). Count how many equal values I have, apart from zero. In my example it should be 2 (1 and 8). I found this formula: SUMPRODUCT(--(A2:E2=A3:E3)) , but it will match only B1, B2, ignoring that number 8 appeared two times as well. 2). Separately, I need to have these repeated values in a single cell, separated with comma, just like "1,8". 回答1: Try this simple UDF() : Public Function compare(r1 As Range, r2 As Range) As Long Dim r As

excel match value(get row) in two-dimensional array

天涯浪子 提交于 2020-02-03 05:44:07
问题 I have the following structure in my excel sheet. E F G H --------- --------- ------ ------- 2 | blah sometext atext smth 3 | textval accc 4 | test avfr 5 | check 6 | ertyui 7 | Can you suggest a way using EXCEL functions ( not VBA ) of getting back the row of a matching string? For example: given test I need to get back 4 , given ertyui 6 I need: the lookup to be done in all the columns of this two-dimensional array and have the function in one cell only 回答1: With your search string in A1:

Why do i get different output when i used the same code, same data but different laptops for vba?

◇◆丶佛笑我妖孽 提交于 2020-02-02 10:16:27
问题 I am trying to make an entire columns of cells absolute when the cells are below the header "Vbd" and I faced this problem: when I use the same code and same data on different laptops (one is excel 2010 and the other one is excel 2016), it gives different output. For instance: Before I press the code, it was like this. After pressing it with the laptop with excel 2010, it gives this output: However when I used the laptop that has excel 2016 it gives me the ideal output which is something like

Why do i get different output when i used the same code, same data but different laptops for vba?

做~自己de王妃 提交于 2020-02-02 10:14:33
问题 I am trying to make an entire columns of cells absolute when the cells are below the header "Vbd" and I faced this problem: when I use the same code and same data on different laptops (one is excel 2010 and the other one is excel 2016), it gives different output. For instance: Before I press the code, it was like this. After pressing it with the laptop with excel 2010, it gives this output: However when I used the laptop that has excel 2016 it gives me the ideal output which is something like

COUNTIF Unique Dates Between a Range

一笑奈何 提交于 2020-02-02 06:12:45
问题 I am trying to find a way to COUNTIF(S) between a certain set of dates, but only get the count of the unique dates. For context, I am tracking meters over days. I can get more than one instance on the same day with differing meter values. The fact that can happen is screwing up my meters/day average. Data!A3:A8700 - is the date range. I am summarizing things monthly, so, in this case, for this example, I'd like something that: 1) Uses COUNTIF (or anything that will work!) between date x and

How to get last word in a cell using Excel Formula

喜欢而已 提交于 2020-01-30 11:34:15
问题 I am trying to get the last word in a cell however, it does not seem to be appearing getting the last word of the cell. It seems to get the partial match and not working correctly. I am using =IFERROR(RIGHT(AP2,SEARCH(" ",AP2)-1),AP2) . This works great for getting the first word in a cell even where the first word is the only word in a cell. Any ideas on why this is not getting the last word correctly? 回答1: You may try this UDF which can be used in another sub routine or on the worksheet as

SUMIF only filtered data

夙愿已清 提交于 2020-01-30 02:58:29
问题 I have an excel formula that sums a particular column of data. SUMIF(Data!$E:$E,$E$89,Data!$F:$F) I'm looking to add a column G which I want to filter over. So, ideally, when I click Data->Filter, I can make SUMIF only sum whatever I filter in column G. Is there a good way of doing so? The data looks something like this: E F G 111 20050719 Foreign 112 20050719 Domestic 576 20050719 Foreign 624 19910101 Domestic $E$89 = 20050719 回答1: The formula you want is taken and modified from this post;