formula

Automatic date update in a cell when another cell's value changes (as calculated by a formula)

北慕城南 提交于 2019-11-27 22:36:16
问题 I have a formula in C2, say =A2+B2 . Whenever C2 changes value (actual value, not formula) I want to have the present date and time updated in D2. I have tried a lot of VBA codes and tricks and none of them works if a formula is entered in C2. BUT if I type a value manually in C2 the date and time is updated as needed. This is of course because a real value is entered/changes - where the formula stays the same, so to speak. Question: Is it possible to create a VBA code (or something else)

VBA to fill formula down till last row in column

时光总嘲笑我的痴心妄想 提交于 2019-11-27 19:52:56
So I'm working on a project and I'm trying to get my VBA code to draw down the formula that's in cell M3 all the way down to the end of the data set. I'm using column L as my base to determine what the last cell with data in it is. My formula is a concatenate of two cells with a text comma in-between them. So in excel my formula is =G3&","&L3 I want excel to draw down this formula so in cell M4 it would be =G4&","&L4 Cell M5 would be =G5&","&L5 and so on. My code looks like: Range("$M$3").Formula = Range("G3") & (",") & Range("L3") Dim Lastrow As Long Application.ScreenUpdating = False Lastrow

Storing formula (equations) in database to be evaluated later (SQL Server 2005)

偶尔善良 提交于 2019-11-27 19:21:40
问题 I'm calculating linear regressions based on a data set. I do not know the regression model or number of parameters at compile-time. I'm storing the regression equation in a SQL Server 2005 database as the string y = 3x^2 + 2x // just an example When I need to make a prediction, I grab the equation from the database, substitue x with the value I'm predicting, and use NCalc to evaluate the resulting string. That method seems to work OK, but I'm wondering if there's a better way or a built-in

Is there a way to have math formulas look nice on a web page (as in LateX, for instance)

半腔热情 提交于 2019-11-27 17:59:54
问题 I wonder if there is a framework or something else to display Math formula on a web page. Other than using images of those formulas... 回答1: Check out MathOverflow, which uses jsMath. Looks pretty good, but can take a few seconds to render everything. 回答2: You may also check MathJax, which supports rendering both LaTex and MathML. 回答3: Check out this review of all of the options for web math display. MathJax is the best option, but it's still in beta. As far as I can tell though, it's the only

Any solution to the Today Calculated Column problem is SharePoint?

十年热恋 提交于 2019-11-27 17:59:46
问题 I would like to be able to use today's date in a calculated column in a SharePoint list to, for example, determine whether a task is overdue. There is a well-documented trick that involves creating a dummy column named "Today," using it in a formula, and then deleting it, thereby "tricking" SharePoint into using the Today function. The problem is that this method does not work reliably -- the calculation is not dynamic; it is only made when the item is saved, and therefore the Today "column"

Error when using predict() on a randomForest object trained with caret's train() using formula

只愿长相守 提交于 2019-11-27 16:21:57
问题 Using R 3.2.0 with caret 6.0-41 and randomForest 4.6-10 on a 64-bit Linux machine. When trying to use the predict() method on a randomForest object trained with the train() function from the caret package using a formula, the function returns an error. When training via randomForest() and/or using x= and y= rather than a formula, it all runs smoothly. Here is a working example: library(randomForest) library(caret) data(imports85) imp85 <- imports85[, c("stroke", "price", "fuelType",

Typesetting LaTeX fraction terms to be larger in an equation

旧巷老猫 提交于 2019-11-27 16:15:13
问题 I have the following formula in LaTeX, based on Fisher's Exact Test. ( NOTE : requires the use of the amsmath package for \binom .) \begin{equation} P(i,j) = \sum_{x=|N(V_i) \cap V_j|}^{\min\{|V_j|, |N(V_i)|} \frac{ \binom{|V_j|}{x} \binom{|V - V_j|}{|N(V_i)| - x}} {\binom{|V|}{|N(V_i)|}} \end{equation} This renders the fraction portion with very small, difficult to read text: I would like my text more readable, as in the following example: equation with readable text in fraction http://www

Math on batch (win)

依然范特西╮ 提交于 2019-11-27 16:00:59
问题 I am developing a CMD batch. I want to do some math in it. This formula: (x+1)100:y So in batch, x = %x%, and y = %y% . I know how to set the variables. Now, how can batch calculate this? (WINDOWS CMD) Do I need something extra? (I need this to be available to users of Windows XP to 7.) 回答1: The set command supports some limited calculation. In your case, you want: set /a result=(100*x)/y Run set /? to see full documentation on what is supported. The /a switch does automatic variable

Making Excel functions affect 'other' cells

安稳与你 提交于 2019-11-27 14:53:16
Let's say that I create a Sub (not a function) whose mission in life is to take the active cell (i.e. Selection) and set an adjacent cell to some value. This works fine. When you try to convert that Sub to a Function and try to evaluate it from from spreadsheet (i.e. setting it's formula to "=MyFunction()") Excel will bark at the fact that you are trying to affect the value of the non-active cell, and simply force the function to return #VALUE without touching the adjacent cell. Is it possible to turn off this protective behavior? If not, what's a good way to get around it? I am looking for

Object not found error when passing model formula to another function

非 Y 不嫁゛ 提交于 2019-11-27 14:08:15
I have a weird problem with R that I can't seem to work out. I've tried to write a function that performs K-fold cross validation for a model chosen by the stepwise procedure in R. (I'm aware of the issues with stepwise procedures, it's purely for comparison purposes) :) Now the issue is, that if I define the function parameters (linmod,k,direction) and run the contents of the function, it works flawlessly. BUT, if I run it as a function, I get an error saying the datas.train object can't be found. I've tried stepping through the function with debug() and the object clearly exists, but R says