formula

Excel formulae, conditional outcomes based on other formulae

泄露秘密 提交于 2019-12-11 06:17:09
问题 So the premise of what i am making is fairly simple and possibly the formulas are too but i only know pretty basic stuff, hence turning to you fine people. So the only real input values on this sheet are in the 'Live Price' column, that is raw data coming in. Pretty much everything else are formulas to get populate the cells. 'Lowest since last signal' is pretty basic, i'm using =IF(A3<B2,A3,B2) but what i actually need is to incorporate another IF function as this should 'reset itself' after

SUM formula VBA

…衆ロ難τιáo~ 提交于 2019-12-11 05:53:37
问题 I am trying to calculate the sum of changing cell range in vba. Unfortunately the cell values are variables. I can't seem to get the following formula to work. Private Sub calcOverheadRate(startCell As Integer, endCell As Integer) Total = endCell + 1 Range("D" & Total).Formula = "=SUM("D" & startCell & ":" & "D" & endCell)" End Sub I get compile error: "Expected: end of statement To solve this problem I changed the function to, Private Sub calcOverheadRate(startCell As Integer, endCell As

Formula is giving error when I add “text”

跟風遠走 提交于 2019-12-11 04:59:45
问题 I'm trying to write a Macro that will do the formatting of a report. All is well up until I try to create the transaction reference number. The formula basically goes =A2 & "-" & B2 & "ABCD" When I insert this into my macro it becomes Range("C2").Formula = "=A2 & "-" & B2 & "ABCD"" As soon as I add my hyphen or the letters at the end it gives me "Compile Error: Expected: end of statement" What am I doing wrong? Edit: So the output would be contentOfA2-contentOfB2 ABCD 回答1: Try this. When

Excel Formula or VBA: Find match's address in separate table with 2 column criteria - No helper columns

℡╲_俬逩灬. 提交于 2019-12-11 03:24:30
问题 I need help with formula structure, I have 2 tables. I would like to find a match where column a & column b equal and get the address in table 2. They will be unique entries. So for example: ProjectInfoTable : A | B | C | ------------------------------------------ 1 | Name | Company | Project | ------------------------------------------ 2 | Chris Evans | Apple | Info | ------------------------------------------ 3 | Chris Evans | Google | Info | ------------------------------------------ 4 |

Reformulate in R log(Y+1)

情到浓时终转凉″ 提交于 2019-12-11 02:31:19
问题 I am working on a data set where I have to generate formula to be passed to lm dynamically. So, I am using reformulate to do this. formula = reformulate(termlabels = c('feature1', 'feature2', 'feature3'), response="y") y is continuous. This gets me the formula as y ~ feature1+feature2+feature3 However I want the formula to be log(y+1) ~ feature1+feature2+feature3 How do I do this using reformulate? 回答1: Pass in the response as a quoted expression: x <- c("feature1", "feature2", "feature3")

A Derived Field in an SQLite3 Database

不想你离开。 提交于 2019-12-11 00:32:02
问题 Good Evening everyone, Today I would like to ask a question relating to derived fields (also known as calculation fields) in SQLite3. Utilizing two values stored within my database "weight" and "distance" I know it is possible to utilize them to perform calculations to return the value I want utilizing a formula that requires both. However I am wondering if there is a way to set a field, by SQLite coding, to automatically generate its own value, so once they have entered there weight and

Crystal Reports Check If String Contains Any Numerical Value

回眸只為那壹抹淺笑 提交于 2019-12-10 22:26:48
问题 I'm using Crystal Reports and in 1 of my formulas, I'd like to check if a string contains any numerical value or not. Examples are shown below... "Chris(12)" Returns True "123" Returns True "Pot" Returns False "John0" Returns True I've already achieved what I want using the INSTR() function. I did it like this... if INSTR(string,"0") <> 0 or INSTR(string,"1") <> 0 or INSTR(string,"2") <> 0 ... then True else False I'd just like to know if there's any shorter or more efficient code. Thank you

How do transform a “matrix”-table to one line for each entry in excel

耗尽温柔 提交于 2019-12-10 20:38:45
问题 I have something like 1 2 3 a x o x b x x o c o o o and want to transform it into lines like 1 a x 1 b x 1 c x 2 a o 2 b x 2 c o 3 a x 3 b o 3 c o by using a formula in the excel document. Playing with $ for assigning values for each row and column does give me proper results. Each time I have to do some manual changes to the formula. Any hint how to write it the right way? 回答1: Suppose that your matrix in the cells A1:D4 in A6 put: =OFFSET($A$1;0;QUOTIENT(ROW()-ROW($A$6);3)+1) in B6 put:

Inconsistent results (C)?

懵懂的女人 提交于 2019-12-10 20:28:56
问题 In this program, I have coded in several formulae and for one formula I am getting inconsistent results, albeit it's the same code and inputs for every run. The function in question is "WqFormula". On some runs I get the correct result which is 0.041667 and on other runs I get 0.000000. I am compiling on Ubuntu (64-bit) using GCC 4.6.3. Another thing is I tried compiling and running this on a pc using GCC 4.4.6 and it gave me completely different results for every formula. Heres the code:

How to fill-up cells within a Excel worksheet from a VBA function?

喜夏-厌秋 提交于 2019-12-10 18:42:39
问题 I simply want to fill-up cells in my spreadsheet from a VBA function. By example, I would like to type =FillHere() in a cell, and in result I will have a few cells filled-up with some data. I tried with such a function: Function FillHere() Dim rngCaller As Range Set rngCaller = Application.Caller rngCaller.Cells(1, 1) = "HELLO" rngCaller.Cells(1, 2) = "WORLD" End Function It breaks as soon as I try to modify the range. Then I tried this (even it's not really the behavior I'm looking for):