formula

conditionally auto name excel file using VBA

橙三吉。 提交于 2020-01-06 02:45:24
问题 I have following VB code that uses certain cell values (used to be fixed location) of a DB default file to name the current worksheet and save it in a specific folder with the use of an ActiveX button. However, column locations started varying in original file and VB ranges no longer pick the correct data to auto name the file. I created formulas (further below) to find the correct values I need to use to auto name the file. How do I insert those formulas in to my VB code for it to do job?

Count Date Values of Current Month - MS Excel

血红的双手。 提交于 2020-01-05 07:55:13
问题 I have following date values (with time) in Column A. 1/1/2012 8:50 1/1/2012 8:45 1/1/2012 8:55 1/1/2012 8:59 1/1/2012 8:12 3/1/2012 8:30 1/1/2012 9:50 2/1/2012 10:00 Now, I want to get a count of cells from Column A having date values of current Month. I have thought of following formula, but I suspect it will work only in machines having mm-dd-yyyy as System-Date-Format. =COUNTIFS(A:A,">="&DATEVALUE(MONTH(TODAY())&"-1"&"-"&YEAR(TODAY())),A:A,"<"&DATEVALUE(MONTH(TODAY())+1&"-1"&"-"&YEAR

use variable in excel formula

余生颓废 提交于 2020-01-05 04:37:08
问题 I'm trying to make an automated sum based on an increasing number of rows. Here is my sample of code but I'm stuck as I don't know the syntax to include a variable in the formula of a cell. Sheets("Orderboek").Select Range("H" & (rOi + 1)).FormulaR1C1 = "=Sum(H3:H"&rOi&")" My variables are declared as follows: Dim i As Integer, a As Range 'i= index a een gebied Dim prText As String 'product text Dim rOi As Long 'rij nummer in orderboek Dim rng, sumrng As Excel.Range Dim r As Long 'rij number

Can Maximo formulas return null?

社会主义新天地 提交于 2020-01-05 04:13:09
问题 The bounty expires in 4 days . Answers to this question are eligible for a +50 reputation bounty. User1973 wants to draw more attention to this question. In Maximo 7.6.1.1: I have an attribute formula on a persistent field called WORKORDER.X . The field type is decimal, length is 18, and scale is 10. The formula is meant to do this: If WOSERVICEADDRESS.LONGITUDEX is not null, use it Else, if ASSET.X is not null, use it Else, if LOCATION.X is not null, use it This is the expression I've come

Excel - Search through a column to find if text matches and count string

霸气de小男生 提交于 2020-01-04 15:28:56
问题 I want to add values from 1 worksheet to another. The first worksheet ("November 2011") simply contains name & status, names are however duplicated and a percentage of a string needs to be added on the second worksheet ("Sales"). e.g. "November 2011" A B 1 Name Status 2 McDonalds Completed 3 McDonalds Won 4 Burger King Won 5 Burger King Won 6 Wendys Completed 7 iHop Completed 8 iHop Completed The second worksheet ("Sales") contains 3 columns Name, Completed & Won. However, Name has had

Excel: Is there a formula for this big space in between another? [closed]

ぃ、小莉子 提交于 2020-01-03 06:40:08
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I have content which looks like this below in the excel. i need to trim away all the unnecessary info. Only keep the -.pdf. The remaining will be removed. i have tried several formula but only able to get the

What is the number of all possible non-cyclic simple paths in a fully-connected directed graph?

橙三吉。 提交于 2020-01-03 04:25:09
问题 Let's say we have a fully connected digraph G with N vertices and M edges. How many edges does the graph have? Is it M = N^2 ? If we take one vertex and start visiting its neighbors in a 'depth-first search' manner and avoiding loops, how many non-cyclic simple paths will we get? For example, if we start from vertex 1 in a graph of 4 vertices, here are the paths: - 1 - 1,2 - 1,3 - 1,4 - 1,2,3 - 1,2,4 - 1,3,2 - 1,3,4 - 1,4,2 - 1,4,3 Is it N! or more for a graph with N vertices? I could not

Hibernate: Many-to-one using Formula

依然范特西╮ 提交于 2020-01-02 08:43:47
问题 I hope someone can help me find an answer. I'm working with a legacy database and I can't change any of the preexisting tables, because other apps depend on them. I have three main existing tables: A,B,C . A has a column with reference to B(many to one relation). The problem is that it should have a relation to C not to B. So I have created a *-1 mapping BC. Tables: A,B,C,BC (all have ID field) A-B many to one B-C many to one through BC Needed:A-C without altering A,B or C I don't want to

Hibernate: Many-to-one using Formula

荒凉一梦 提交于 2020-01-02 08:43:10
问题 I hope someone can help me find an answer. I'm working with a legacy database and I can't change any of the preexisting tables, because other apps depend on them. I have three main existing tables: A,B,C . A has a column with reference to B(many to one relation). The problem is that it should have a relation to C not to B. So I have created a *-1 mapping BC. Tables: A,B,C,BC (all have ID field) A-B many to one B-C many to one through BC Needed:A-C without altering A,B or C I don't want to

VBA haversine formula

倖福魔咒の 提交于 2020-01-02 07:03:14
问题 I am trying to implement Haversine formula into excel function. Its looks like this: Public Function Haversine(Lat1 As Variant, Lon1 As Variant, Lat2 As Variant, Lon2 As Variant) Dim R As Integer, dlon As Variant, dlat As Variant, Rad1 As Variant Dim a As Variant, c As Variant, d As Variant, Rad2 As Variant R = 6371 dlon = Excel.WorksheetFunction.Radians(Lon2 - Lon1) dlat = Excel.WorksheetFunction.Radians(Lat2 - Lat1) Rad1 = Excel.WorksheetFunction.Radians(Lat1) Rad2 = Excel.WorksheetFunction