excel-formula

“Non-contiguous” range specification in formula

瘦欲@ 提交于 2019-12-30 09:53:18
问题 [2018-08-01: See new material near bottom of post.] I just ran across a Q-n-A here that included an example of a function referencing a range using a specification I had not seen before. I played around with it a little and discovered that most Excel functions will return a value when using this kind of reference: =SUM(A1:A5:C1:C5:E1:E2:F3:F4) Notice all the ":"s in there. With the cursor in the formula bar, those non-contiguous cells are highlighted, as if only those cells would be totaled.

Excel IF statement Comparing text with number

Deadly 提交于 2019-12-30 08:32:54
问题 I was using IF statement to group some numbers together. In column A I have numeric and text values. A B 1 s =IF(A1>200,2345,"ad") If I do this then the B1 returns 2345 . How does Excel compare string values with number values? 回答1: For the Excel compare operators (e.g. < , = , > ), number values are less than text values which are less than logical values. You can use the VALUE function to convert text values to number values for number comparisons. You can use the TEXT function to convert

Excel: how do I remove all carriage returns from a cell?

有些话、适合烂在心里 提交于 2019-12-29 20:28:48
问题 I want to get rid of all the carriage returns in my cell. How do I do this? 回答1: =CLEAN(A1) Clean removes all nonprintable characters from text. -- Excel Help Documentation 回答2: Assuming your cell is in A1, you can use the following formula: =SUBSTITUTE(A1,CHAR(10),"") Depending on the carriage return, you may have to use char(13) instead of char(10) . 回答3: Select the cell or cells, click Data/Text To Columns form Excel's menu bar, choose the Delimited option on the first dialog page, click

Format numbers in thousands (K) in Excel

安稳与你 提交于 2019-12-29 11:47:15
问题 In MS Excel, I would like to format a number in order to show only thousands and with 'K' in from of it, so the number 123000 will be displayed in the cell as 123K It is easy to format to show only thousands (123), but I'd like to add the K symbol in case the number is > 1000. so one cell with number 123 will display 123 one cell with 123000 will show 123K Any idea how the format Cell -> custom filters can be used? Thanks! 回答1: Custom format [>=1000]#,##0,"K";0 will give you: Note the comma

How to keep one variable constant with other one changing with row in excel

我与影子孤独终老i 提交于 2019-12-29 10:08:34
问题 Lets say I have one cell A1, which I want to keep constant in a calculation. For example, I want to calculate a value like this: =(B1+4)/(A1) How do I make it so that if I drag that cell to make a calculation across cells in many rows, only the B1 value changes, while A1 always references that cell, instead of going to A2, A3, etc.? 回答1: Use this form: =(B0+4)/$A$0 The $ tells excel not to adjust that address while pasting the formula into new cells. Since you are dragging across rows, you

How to keep one variable constant with other one changing with row in excel

依然范特西╮ 提交于 2019-12-29 10:08:21
问题 Lets say I have one cell A1, which I want to keep constant in a calculation. For example, I want to calculate a value like this: =(B1+4)/(A1) How do I make it so that if I drag that cell to make a calculation across cells in many rows, only the B1 value changes, while A1 always references that cell, instead of going to A2, A3, etc.? 回答1: Use this form: =(B0+4)/$A$0 The $ tells excel not to adjust that address while pasting the formula into new cells. Since you are dragging across rows, you

Find the number of a row that contains two specific values?

痞子三分冷 提交于 2019-12-29 08:51:45
问题 I have a table of information with multiple columns. The first column is "Date" (range A:A) and the second column is "Name" (range B:B). When I enter a date into cell Q1 and a name into cell R1, I need a formula that will find which row contains both of those values and output the row number. I feel like I need to use the match function but can't quite figure it out. Does anyone know how to do this? 回答1: You can use MATCH in an "array formula" like this =MATCH(1,(A:A=Q1)*(B:B=R1),0) which

Excel formula-based function for SHA256 / SHA512 hashing without VBA or macros

为君一笑 提交于 2019-12-29 06:57:22
问题 It's the year 2017 and anybody who needs to use hashes should avoid 'broken' ones such as MD5, if security is important. Has anybody found or created a way to do more secure SHA256 or SHA512 hashing in Excel, without using VBA or macros? A spectacular example of this being done before was over 3½ years ago with MD5 (as seen in this SO: MD5 Hash function in excel without using VBA). Reason for avoiding VBA/Macros: Compatibility with mobile devices, such as Excel for iOS. Side Note: The

Excel Array formula IF(multiple criteria)

青春壹個敷衍的年華 提交于 2019-12-29 06:32:53
问题 In my spreadsheet, comparing headphones, our instruction is basically to use as many different formulas as possible. So as part of the spreadsheet, I would like to be able to show the most expensive headphones per manufacturer , cheapest per manufacturer, best rated per manufacturer etc... So far I have been able to get some mostly working array formulas. For example, this formula works to get the model of the manufacturer "Sennheiser" with the highest price: =INDEX($Data.$B$5:$L$32,SMALL(IF(

referencing sheets by number instead of name in cells

此生再无相见时 提交于 2019-12-29 06:23:48
问题 Lets say sheet3.name = "d" Is there a way I could put in a cell on sheet2 the formula =sum(sheet3!b:b) where sheet3 is being substituted with the actual sheet3 name? I can only get =sum('d'!b:b) to work so far. I could use VBA for this probably but I'm curious how to do this in a cell so I don't have to run a macro each time. 回答1: If you can use a UDF User Defined Function that will return the sheet name Function SHEETNAME(number As Long) As String SHEETNAME = Sheets(number).Name End Function