excel-formula

Excel - ActiveChart.SetSourceData Source: Runtime Error '445' : Object doesn't support this action

不问归期 提交于 2021-01-29 19:01:31
问题 I have an excel workbook (v2016), where I managed to get the table name of a table based on the highest number of entries. This value (which is a name of a table) is in Sheet "Pareto" Cell B4. I'm using the following code to update a chart using an above-mentioned table name Sub GetTables() Dim YTDL1TableName As String Dim YTDL1Range As Range YTDL1TableName = Sheets("Pareto").Range("B4") Set YTDL1Range = Sheets("Pareto").Range(Sheets("Pareto").ListObjects(YTDL1TableName).Range.Address(True,

How to combine two IF statements in excel

◇◆丶佛笑我妖孽 提交于 2021-01-29 18:39:59
问题 I want to combine the following two IF statements in excel but I was not able to do so. I have tried to use IF , AND , OR statements with no luck. =IF(C98="CAB",D98*R1-F98,F98-D98*S1) =IF(C99="CAB",I99*R6-D99,F99-I99*S6) Once I want to combine the two I get you are trying to create too many arguments. Thanks, Jay 回答1: If you want to combine formulas and according to your last comment, it looks like you are trying to do something like this: =if(condition="CAD",perform Calculation,If(Condition=

Convert date and time to ISO yyyy-mm-dd in Excel

空扰寡人 提交于 2021-01-29 18:26:19
问题 In a csv file which I have opened in Excel date is formated like "2014-08-28 09:03:19.789". How can the above be converted to just yyyy-mm-dd (2014-08-28) in Excel? I have tried to set the column to yyyy-mm-dd but it does not change. 回答1: What version of Excel are you using? (I'm not sure if that matters.) If you tried just typing yyyy-mm-dd in the format selector box that will not work. You need to open the custom format dialog and type in yyyy-mm-dd as a new format there. 回答2: Use the Text

How to concatenate cell (row wise) in excel till a value is found?

╄→гoц情女王★ 提交于 2021-01-29 17:58:24
问题 I have data in MS excel sheet as : Row Column A 1 AAA Number of ABC 2 Streaming Call 3 Explanation 4 BBB Number of ABC 5 Streaming Call 6 from source 7 Explanation 8 CCC Number of ABC 9 Streaming Call 10 from source 11 to Dest 12 Explanation ... ... 196000 Explanation I want to keep concatenating cell of column A in column B, till the cell value is "Explanation" : 1 AAA Number of ABC AAA Number of ABC 2 Streaming Call AAA Number of ABC Streaming Call 3 Explanation Explanation 4 BBB Number of

How to insert array formula in an Excel sheet with openpyxl?

孤街醉人 提交于 2021-01-29 17:37:57
问题 I'm using OpenPyxl to create and modify an Excel sheet. I have the following formula in Excel : =(SUM(IF(LEFT(Balances!$B$2:$B$100,LEN($B4))=$B4,Balances!$D$2:$D$100))) This formula which is an "array formula" is working but in order to write it by hand, I have to finish with CTRL+SHIFT+ENTER (because it's an array formula). This transform then the formula as follow : {=(SUM(IF(LEFT(Balances!$B$2:$B$100,LEN($B4))=$B4,Balances!$D$2:$D$100)))} I want to be able to write this formula via

Count apple based on common ID between two tables

南笙酒味 提交于 2021-01-29 14:12:02
问题 I have two Excel tables that look like this: Table 1 A B C ID Stocked Sale 1 shelf sold 5 display sold 9 shelf sold 12 shelf sold 13 shelf Table 2 P Q ID Stocked a2 apple 88 83 1 apple 9 apple I need to count the total number of apples by common ID, given that apples are: stocked on the shelf in Table 1 sold in Table 1 So, the outcome has to be 2 apples. Here is what I have tried thus far: COUNTIFS(B:B, "shelf", C:C, "sold", Q:Q, "apple") I can't figure out how to count by common id... 回答1:

Find the top 3 items in an array, with priority given to those higher on a list in the event of tie

痴心易碎 提交于 2021-01-29 13:54:06
问题 My list has only numbers, with a corresponding name to each score in each row. I am looking for a formula to draw lookup the 1st, 2nd and 3rd names with the corresponding rank. However, in the event of ties, i would like still like to draw the largest number, with preference for names higher on the list. 回答1: In cell E1 insert following formula and then copy down. =IFERROR(INDEX($A$1:$A$15,SMALL(IF($B$1:$B$15=MAX($B$1:$B$15),ROW($A$1:$A$15),10^7),ROWS($A$1:A1))),"") Note: This is array

Colour all rows with the same colour until value of a cell is not the same as in the previous row anymore

扶醉桌前 提交于 2021-01-29 12:44:08
问题 I have the below Excel-table: | A | B ---------|-----------|--------------- 1 | 500 | 2 | 500 | 3 | 500 | ---------|-----------|---------------- 4 | 600 | 5 | 600 | ---------------------|---------------- 6 | 300 | ---------------------|---------------- 7 | 800 | 8 | 800 | 9 | 800 | ---------------------|---------------- 10 | 200 | 11 | 200 | ---------------------|---------------- 12 | 900 | ---------------------|---------------- 13 | 100 | 14 | 100 | In Column A there a different numbers

Power Query, keep output table same size while refreshing

风格不统一 提交于 2021-01-29 12:32:26
问题 I'm using this code to filter some text out of a .txt file. Then in another sheet i use cell references to built my custom table. Everything is working great, except if the source file is empty, Power Query resizes the output table so that the reference got broken in the second sheet. =cellref!$C4 how can I prevent power query to resize the range in his table? or, somehow, keep the same number of rows/column so that it won't break my references? let Source = Table.FromColumns({Lines

Excel Formula to find a specific number

巧了我就是萌 提交于 2021-01-29 12:24:14
问题 A newbie here, can someone help me to figure it out. I have the follwoing data in Excel: Column A: T1 T2 T3 2T1 3T2 1T3 I want to return how often T1 occurs in column A.. T1 in column A should be 3 (T1 + 2T1) Does someone know how to solve this problem? 回答1: Possibly multiple ways, one way would be: Formula in C2 : =SUM(IF(MID(A$1:A$6,SEARCH("T",A$1:A$6),LEN(A$1:A$6))=B2,IFERROR(LEFT(A$1:A$6,SEARCH("T",A$1:A$6)-1)*1,1),0)) Note: Confirm through Ctrl Shift Enter 来源: https://stackoverflow.com