formulas

Condense a multi-row, multi-column formula output into a single row

流过昼夜 提交于 2019-12-11 08:36:53
问题 I have a QUERY formula that imports the first three rows of some data, "Select Col1, Col2 Order by Col2 desc limit 3" , producing an output like this: | c1 | c2 r1 | Red | 53 r2 | Blue | 45 r3 | Yellow | 15 I'd like to get need those same formula values to look like this: | c1 | c2 | c3 | c4 | c5 | c6 r1 | Red | 53 | Blue | 45 | Yellow | 15 where the whole output is in a single row. Is this possible? 回答1: Yep, wrap your query function with TEXTJOIN =TEXTJOIN(" ", TRUE, QUERY(....)) To get

Formula to Assign whether a date is “In Business Hours” or “Outside Business Hours” in excel

 ̄綄美尐妖づ 提交于 2019-12-11 07:24:16
问题 I'm trying to create a formula to determine whether a phone call was made inside or outside of business hours based on the day and time of the call Business hours are Monday to Friday 8AM to 8PM and Saturday 8AM to 2PM. So essentially what I need to create the formula for is; if call is Monday, Tuesday, Wednesday, Thursday, Friday and time is >8 and <20 or call is Saturday and time is >8 and <14 then show "Inside Business Hours" For everything else show "Outside Business Hours" Thanks 回答1: If

polr(..) ordinal logistic regression in R

荒凉一梦 提交于 2019-12-11 06:44:40
问题 I'm experiencing some trouble when using the polr function. Here is a subset of the data I have: # response variable rep = factor(c(0.00, 0.04, 0.06, 0.13, 0.15, 0.05, 0.07, 0.00, 0.06, 0.04, 0.05, 0.00, 0.92, 0.95, 0.95, 1, 0.97, 0.06, 0.06, 0.03, 0.03, 0.08, 0.07, 0.04, 0.08, 0.03, 0.07, 0.05, 0.05, 0.06, 0.04, 0.04, 0.08, 0.04, 0.04, 0.04, 0.97, 0.03, 0.04, 0.02, 0.04, 0.01, 0.06, 0.06, 0.07, 0.08, 0.05, 0.03, 0.06,0.03)) # "rep" is discrete variable which represents proportion so that it

Excel formulas don't update unless I click on the formula and press enter

拈花ヽ惹草 提交于 2019-12-11 06:00:03
问题 I have an excel workbook with formulas that works fine except for two table columns which don't recalculate on opening. The excel sheet is 2003 xls (compatibility mode in 2010). I've my workbook is set to calculate automatically and the cells containing the formulas are formatted as general. I've tried clicking a blank cell and using paste special add or multiply and I've tried pasting just the formatting of other cells that work but none of this has fixed my problem. Similarly clicking

Google Sheets Formula to Extract and Convert Currency from € or £ to USD

戏子无情 提交于 2019-12-11 04:14:14
问题 I'm trying to do the following: Check the cell for N/A or No ; if it has either of these then it should output N/A or No Check the cell for either £ or € or Yes ; If it has one of these then it would continue to step 3. If it has $ then it should repeat the same input as the output. Extract currency from cell using: REGEXEXTRACT(A1, "\$\d+") or REGEXEXTRACT(A1, "\£\d+") (I assume that's the best way) Convert it to $ USD using GoogleFinance("CURRENCY:EURUSD") or GoogleFinance("CURRENCY:GBPUSD"

Java precise calculations - options to use

杀马特。学长 韩版系。学妹 提交于 2019-12-11 00:35:49
问题 I am trying to establish some concise overview of what options for precise caluclations we have in JAVA+SQL. So far I have found following options: use doubles accepting their drawbacks, no go. use BigDecimals using them in complicated formulas is problematic for me use String.format/Decimal.format to round doubles do i need to round each variable in formula or just result to get BigDecimal precision? how can this be tweaked? use computed fields option in SQL. drawback is that I'd need

Calculate hierarchical labels for Google Sheets using native functions

眉间皱痕 提交于 2019-12-10 23:34:31
问题 Using Google Sheets, I want to automatically number rows like so: The key is that I want this to use built-in functions only. I have an implementation working where child items are in separate columns (e.g. "Foo" is in column B, "Bar" is in column C, and "Baz" is in column D). However, it uses a custom JavaScript function, and the slow way that custom JavaScript functions are evaluated, combined with the dependencies, possibly combined with a slow Internet connection, means that my solution

How to extract parsed data from once cell to another

那年仲夏 提交于 2019-12-10 17:56:46
问题 Given a spreadsheet cell containing a string that consists of a hyphenated series of character segments, I need to extract the last segment. For example, consider column A containing data strings like XX-XXX-X-XX-XX-G10 , where X denotes any character. What formula would I need to place in column B to get G10 as a result? A B 1 XX-XXX-X-XX-XX-G10 G10 I'm looking for a formula that could work in in Libre Office Calc, Open Office Calc, MS Excel, or Google Sheets. 回答1: Another possibility in LO

In Google Sheets, how can you find the mode of non-numerical data?

跟風遠走 提交于 2019-12-10 13:46:41
问题 If I want to find the mode of A2:A10, but my values are something like: Foo Foo Bar Foo Baz Bar Foo Bar Foo , what can I do? The =MODE() function only takes numerical data, so is there a way to find the most frequent of these values? Thank you! 回答1: Use a MATCH on a MAX(COUNTIF(...)) to a COUNTIF and pass the row position back to an INDEX. =index(A2:A10, match(max(countif(A2:A10, A2:A10)), countif(A2:A10, A2:A10), 0)) In the case of a tie in frequency, the first in the list that matches the

How to use iosMath in SWIFT project? Resp. how to add MTMathUILabel() to project?

。_饼干妹妹 提交于 2019-12-10 12:07:43
问题 I am new to programming, but I am interested in how to use iosMath for iOS. I could instal Cocoa Pod already and I did import iosMath to project. Question is: how to visualise math equations? I understand that it should be used MTMathUILabel for that, however I do not know, how to add it to program. Is there a way how to create subclass of UIView or something, to be able able to do it? Here sample of my code: import UIKit import Foundation import CoreGraphics import QuartzCore import CoreText