formula

Check if column contains specific values in excel

百般思念 提交于 2019-12-07 13:46:33
问题 I need to check in excel whether a column (b1:b300) contains only 2 specific values 1,-24. How can check this using formulas only. Please help 回答1: You can use a VLOOKUP, and depending if you search for ANY of the two or BOTH of the two, you combine two VLOOKUP as needed. =VLOOKUP(arg,range,1,FALSE) will yield #N/A if not found, which can be further analyzed using the =ISNA() function 回答2: It is simple: =COUNTIFS(B1:B300,"<>1",B1:B300,"<>-24") 来源: https://stackoverflow.com/questions/7468861

Have a Crystal Reports formula convert numeric strings to values, but leave non-numeric blank/null

老子叫甜甜 提交于 2019-12-07 05:19:39
问题 I have a string field that mostly contains numeric decimal values, but sometimes contains values like "<0.10" or "HEMOLYSIS". I want to use a formula to convert these numeric value strings to values, leaving non-values blank (null). if isNumeric({a_omgang.omg_resultat}) then toNumber({a_omgang.omg_resultat}) returns 0 for all non-numeric values, which makes it hard to calculate e.g. average or mean, or to count the number of values. (The latter can of course be achieved by using a running

Fast formula for a “high contrast” curve

删除回忆录丶 提交于 2019-12-07 04:39:46
问题 My inner loop contains a calculation that profiling shows to be problematic. The idea is to take a greyscale pixel x (0 <= x <= 1), and "increase its contrast". My requirements are fairly loose, just the following: for x < .5, 0 <= f(x) < x for x > .5, x < f(x) <= 1 f(0) = 0 f(x) = 1 - f(1 - x), i.e. it should be "symmetric" Preferably, the function should be smooth. So the graph must look something like this: . I have two implementations (their results differ but both are conformant): float

Add a cell formula in Excel via vba

会有一股神秘感。 提交于 2019-12-07 03:24:12
问题 I’m not an Excel or VBA expert but I want to insert this current excel formula into cell’s using VBA. Current Excel formula: =IF(OR(ISNUM(D570)=FALSE;ISNUM(D573)=FALSE);"";IF(C573="Total";D573-D570;"")) VBA formula : ActiveSheet.Range("a" & ActiveSheet.Rows.Count).End(xlUp).Offset(2, 12).Value = "=IF(OR(ISNUM(R[-3]C[-9])=FALSE;ISNUM(R[0]C[-9])=FALSE);'';IF(R[0]C[-10]='Total';R[0]C[-9]-R[-3]C[-9];''))" It doesn’t work… Someone can help me please? 回答1: Try using .formula = instead of .value =

Need a formula interpreter for .Net [closed]

若如初见. 提交于 2019-12-07 02:21:57
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I'm looking for a formula interpreter that I can use in a C# application. It needs to be able to interpret a string like this: max(1+2

Separate octets of IP address using formulas

江枫思渺然 提交于 2019-12-07 01:07:57
问题 I want to separate out the octets of an IP address using Formulas. I have tried some things like substitute & find but cannot figure this out. Example of what I want to achieve, by only starting with Cell A1 and Cell B1 : 10.17.9.192 | 192.168.0.1 10 | 192 17 | 168 9 | 0 192 | 1 回答1: Here are four formulas you need A2:=LEFT(A1,FIND(".",A1)-1) A3:=MID(A1,FIND(".",A1)+1,FIND(".",A1,FIND(".",A1)+1)-FIND(".",A1)-1) A4:=MID(A1,FIND(".",A1,FIND(".",A1)+1)+1,FIND(".",A1,FIND(".",A1,FIND(".",A1)+1)+1

Can Range.Value2 & Range.Formula have different values in C#, not VBA?

白昼怎懂夜的黑 提交于 2019-12-06 16:21:55
I want to create a UDF which is like GetPath(parameter) , where parameter can be a cell reference like "B1" , or a string what the GetPath does, based on input, it will call web service to get path for input e.g. formula of cell A1=GetPath(B1) , cell B1 has some string, the function should return path and put it in cell A1, i.e. "Value2" of A1 should be path of B1. Now in C#, when I did sth FormulaCell.Value2 = path , its formula changes, too but I want "Formula" & "Value2" to be different. I know this is possible in VBA, but I am using C#. Anyone knows how to accomplish this? thanks I googled

PHP Formula For a Series of Numbers (Mathy Problem)

…衆ロ難τιáo~ 提交于 2019-12-06 15:37:55
My apologies if this is the wrong site for this problem, as it is more math-related than programming. I am trying to write a series of 7 page links, in a Google-esque fashion. Essentially, it will be 7 numbers, s to ( s + 6), where s is my starting value. I am having trouble calculating my starting value, given a limited amount of information. In advance, I know the maximum value in the series, this is variable, but it is always greater than 7. In my formula-writing attempts, I have been calling this value g , so g > 7. I also know the page number the user has selected. I have been calling

Split screen based on number of items and screen ratio

时光毁灭记忆、已成空白 提交于 2019-12-06 13:51:58
问题 I have to split the screen equally (as possible) given a dynamic number of items. So i need to find the number of columns and rows based on the screen size/ratio. Each item size is not important since i will calculate them in % based in the items per col and row. If i have 5 items, then (depending on the screen ratio) i will probably have 3 columns in the 1st row and 2 columns in the 2nd row. That's ok. 回答1: First you have to decide what you mean with "divide the screen equally". It probably

Filter rows by date (A column) and write sum (C column) to field in another sheet

白昼怎懂夜的黑 提交于 2019-12-06 13:45:15
I have two sheets in Google Spreadsheet document. The first one has columns Month, Income, Expense and Profit (A,B,C,D respectively) and in each row expense value should be calculated based from filter (I think) from another sheet called Expenses. The Expenses sheet contains columns Date, Name and Price. So, what I need is to write formula to filter only expenses for specific month, to sum all prices in those rows and to write that value to C column (row for that month) in first sheet. You can see this example and please help me out to solve this. This is a formula that can be filled down (I