formula

How to draw sky chart? [closed]

为君一笑 提交于 2019-11-26 14:47:20
How do I draw a star chart like this ? I have: A star database with coordinates (right ascension and declination) Observer coordinates (latitude, longitude) Time of observation I need a formula which considered these parameters. stellar database google for: BSC (Bright star catalog) ~10K stars up to +6.5 mag (naked eye) Hipparcos ~118K stars up to +12 mag (telescopes) and also has parallax (3D coordinates) and many more Hipparcos is mine favorite. both can be downloaded freely in ASCII format from many Astornomy server just google ... planets (bodies) You can compile the orbital parameters

VBA to open Excel hyperlink does not work when hyperlink generated with a formula

佐手、 提交于 2019-11-26 14:45:58
问题 There seems to be a bug with Excel hyperlinks which are generated with a formula. I'm using Excel 2010. I have a spreadsheet with cells containing URLs, and my goal is to do the following two things: Turn these cells into hyperlinks. Create a keyboard shortcut to open these hyperlinks so I don't have to use the mouse. To do #1, initially I just used the function =HYPERLINK() . So, my URLs are in column A , and I used this formula to make hyperlinks in column B . To do #2, I created the

Drawing formulas with Quartz 2d

£可爱£侵袭症+ 提交于 2019-11-26 14:33:48
问题 In my iPhone App I'd like to draw a few formulas. How can I manage that with quartz 2d? Is there a way to build formulas like for example in latex? Or are there any existing frameworks? Thanks. 回答1: As the developer of an iPhone application which does just that, trust me when I say typesetting equations is not a trivial undertaking. In my case, I used Core Animation layers to construct the sub-elements of a parsed equation. The equations are constructed hierarchically, and the operations that

How to use reference variables by character string in a formula?

血红的双手。 提交于 2019-11-26 13:06:46
In the minimal example below, I am trying to use the values of a character string vars in a regression formula. However, I am only able to pass the string of variable names ("v2+v3+v4") to the formula, not the real meaning of this string (e.g., "v2" is dat$v2). I know there are better ways to run the regression (e.g., lm(v1 ~ v2 + v3 + v4, data=dat) ). My situation is more complex, and I am trying to figure out how to use a character string in a formula. Any thoughts? Updated below code # minimal example # create data frame v1 <- rnorm(10) v2 <- sample(c(0,1), 10, replace=TRUE) v3 <- rnorm(10)

Concatenate column headers if value in rows below is non-blank

非 Y 不嫁゛ 提交于 2019-11-26 12:33:18
问题 I have table with data in the format below. Data I want the finished table to have the blank column to be populated like the highlighted one below. Finished Table So, I need a formula or VBA that will return and concatenate the headers of non-blank cells in each row. 回答1: Use¹ the following as an array formula . =TEXTJOIN("-->", TRUE, IF(LEN(C3:I3), C$2:I$2, "")) Pre-Excel 2016 versions While you could just string together a series of IF statements, a cleaner alternate might be to write a

Get formula from Excel cell with python xlrd

青春壹個敷衍的年華 提交于 2019-11-26 09:09:48
问题 I have to port an algorithm from an Excel sheet to python code but I have to reverse engineer the algorithm from the Excel file . The Excel sheet is quite complicated, it contains many cells in which there are formulas that refer to other cells (that can also contains a formula or a constant). My idea is to analyze with a python script the sheet building a sort of table of dependencies between cells, that is: A1 depends on B4,C5,E7 formula: \"=sqrt(B4)+C5*E7\" A2 depends on B5,C6 formula: \"

How can I run a VBA code each time a cell get is value changed by a formula?

假装没事ソ 提交于 2019-11-26 08:23:42
问题 I would like to know how can I run a VBA code each time a cell get is value changed by a formula?? Ive managed to run a code when a cell gets its value changed by the user, but it doesn\'t work w 回答1: If I have a formula in cell A1 (e.g. = B1 * C1) and I want to run some VBA code each time A1 changes due to updates to either cell B1 or C1 then I can use the following: Private Sub Worksheet_Calculate() Dim target As Range Set target = Range("A1") If Not Intersect(target, Range("A1")) Is

Formula with dynamic number of variables

﹥>﹥吖頭↗ 提交于 2019-11-26 06:52:52
Suppose, there is some data.frame foo_data_frame and one wants to find regression of the target column Y by some others columns. For that purpose usualy some formula and model are used. For example: linear_model <- lm(Y ~ FACTOR_NAME_1 + FACTOR_NAME_2, foo_data_frame) That does job well if the formula is coded statically. If it is desired to root over several models with the constant number of dependent variables (say, 2) it can be treated like that: for (i in seq_len(factor_number)) { for (j in seq(i + 1, factor_number)) { linear_model <- lm(Y ~ F1 + F2, list(Y=foo_data_frame$Y, F1=foo_data

How can I insert variable into formula in VBA

大兔子大兔子 提交于 2019-11-26 06:07:59
问题 Can anyone solve this? Sub test Dim i as integer For I = 1 to 10 ActiveCell.Offset(0, 2).Formula = \"=Sum(E15,&i&)\" Next I End Sub 回答1: your actual goal is unclear you may want to start form this code Sub test() Dim i As Integer For i = 1 To 10 cells(i, 4).Formula = "=Sum(E" & i & ":E15)" Next End Sub and adjust it to your needs, knowing that: it currently writes in cells "D1:D10" since cells(i, 4) references a cell in 4th column (i.e.: column "D") 4 and i row, and we're inside a loop where

Count Unique values with a condition

℡╲_俬逩灬. 提交于 2019-11-26 04:56:01
问题 In column A I have list of different names. In column B, I have values either 0 or 1. I want to get a count of all the unique names from column A which have 1 in column B. Using below array formula I am able count unique names but not able to apply condition on column B. =SUM(1/COUNTIF(A:A,A:A)) 回答1: Assuming no more than 100 rows try this "array formula" to count the different names in A2:A100 where there is a 1 in the same row in B2:B100: =SUM(IF(FREQUENCY(IF(B2:B100=1,IF(A2:A100<>"",MATCH