Calculating Non-uniform Cycle Periods
Dec 25, 2012
I am seeking to analyse loading cycles on a beam.
I have half hourly data for five years, in two columns A: Date and B: Load in Kg. The load on the beam is not uniform over time and shows a cycle of load.
In Column C I have an AVERAGE function that returns the average load based in the 4 hour period (2 hours backward looking and 2 hours forward looking) if it is less than 50% of the maximum load.
The data in Column C returns sets of continuous vertical cells of data showing periods of low loading and empty cells where the load is greater than 50%. The sets can be as small as one cell (i.e. one hour) to a set of contiguous vertical cells for one week of low load.
My objective is to use Excel to analyse all the sets of contiguous cells in Column C to determine the time period from the first cell of each set to the last cell of that set and drop the result into another work sheet (pivot table) to further analyse these results.
View 5 Replies
ADVERTISEMENT
Mar 16, 2009
I'm trying to calculate the length of a work order to develop an average and future proposal estimates.
For example:
Job received = A1
In work = B1
Job completed = C1
Total days to complete = D1
I know I can enter in D1 C1-A1 and get the correct result but I want the field to calculate A1-TODAY() until a completion date is entered. This would display the number of days the job has been in work until completed. Once completed use the C1 for calculation.
Sorta like
If(C1=">=0" then (A1-Today()) else C1-A1)
I will then use conditional formatting with block colors to indicate whether it is a completed job or in work job.
View 10 Replies
View Related
Dec 2, 2011
I have one shared book having different tabs from my team member.
in every tabs i got Dates written in various forms like,,,,2/12/2011, 12/2/2011, 12-2-2011 etc......
I want to get uniform date format from all the tabs at once.
View 6 Replies
View Related
Jun 25, 2012
I'm looking to generate correlated random unifrom numbers between 0 and 1 using the excel random number generator, rand(), and a user defined correlation matrix - without the use of a plugin. I realise there are plenty of risk plugins I could use, but was looking for something excel/vba reliant so I could distribute it without the user having to install anything.
I've tried using a cholesky matrix, but most of time it resulted in one of the numbers being 1, and higher that all the others.
View 2 Replies
View Related
Aug 7, 2013
I have a very large dataset (~5000 points in a 2D array) which I need to plot and fit a linear trendline to. There are 90 subjects each of which has a daily binary event checked over its lifespan. eg:
Day: 1 2 3 4 5 6 7 8 9 10
subj 1 0 1 0 0 0 (dead)
subj 2 1 1 1 0 1 0 1 0 0 0(dead)
subj 3 0 0 1 0(dead)
I simply averaged the number of events per day per subject and plotted them but near the long-lived end of the data the variability gets really high. I have normalized the lifespan for each subject such that instead of the event occurring on day 10, it occurred at 0.2 of its total lifespan (dying on day 50). Now that my data is in this format, I want to create an average for all subjects over the domain 0-1 representing birth-death.
The trouble is that now each subject's domain has different intervals between points (eg. 0.1 for subjects living 10 days and 0.006993 for those living 143 days). How to now space out the cells (somewhat) automatically so I can average the columns? My array is 90 x 150 so doing it manually is not really possible. Or, alternatively, is there a way to create a continuous average rather than a discrete one? Some sort of function that goes through each infinitely small (or even a discrete really tiny interval) point of the domain (0-1) and averages the binary y-value?
View 2 Replies
View Related
Nov 28, 2013
I am a novice user and not very familiar with Macros or VBA. I took a macro I found on contextures and got it to resize comments that already exist. However, I am trying to get it to also create the comment (with no content) if the comment does not already exist, and then resize it. This is what I have so far:
Code:
Sub ResizeCommentsInSelection()
Dim mycell As Range
Dim myRng As Range
Dim lArea As Long
Set myRng = Selection
[code].....
View 2 Replies
View Related
Aug 28, 2009
I have this code ...
View 13 Replies
View Related
Mar 4, 2014
I've recorded a Macro that goes through multiple spreadsheets and refreshes the pivot tables in the sheets. I would like the Macro to run without it actually showing it go to each sheet and showing the pivot table updating. Bascially I would like the spreadsheet to remain on the first sheet while it's working with all the spreadsheet in the workbook when the macro is running.
View 2 Replies
View Related
Sep 29, 2011
I have a table, 2 columns by 10 rows (A1:B10). The table values are the result of calculations (imagine they are random). These calculations are performed repetitively for some specified number of repetitions (let's say 10 iterations). (e.g. all of the table values change with each iteration until the 10 iterations are complete. With each iteration all of the values in the table change). At the completion of the 10 iterations (one full cycle) I want to know the minimum and maximum calculate value as the 10 iteration cycle was performed.
To simplify; the table changes 10 times in one cycle. I want to know the minimum and maximum values attained in the cycle.
It is easy to determine the minimum and maximum values of the table for each iteration. It seems the problem would be write some vba code that 1) found the min. and max. 2) save that value 3) find the min and max in the next iteration and compare the old and new values 4) retain the value or replace the min and max values with new values and 5) proceed to the next iteration until the cycle is complete.
View 3 Replies
View Related
Dec 3, 2013
So I have a cycle time formula; Start Date to Completion Date, if the task is not complete the completion date field is blank. In this case the cycle time is listed as a negative 5 digit value. The networkdays formula takes into consideration weekends and holidays.How can this field be left blank rather than the negative value?
=NETWORKDAYS(I2,P2,Sheet3!$A$2:$A$10)
View 6 Replies
View Related
May 9, 2007
I want to combine cells from two adjacent columns in this way: a1 is combined with everything in column b, then a2 is combined with everything in column b, etc. So that I have a1b1, a1b2, a1b3, a1b4, a2b1, a2b2, a2b3, etc.
View 9 Replies
View Related
Mar 29, 2013
I am trying to cycle ALL open workbooks so that I can choose the file to manipulate in subsequent code this is the code that I am utilizing furhter below
this is my code
VB:
For Each wb In Workbooks
If MsgBox("Do you want to do access this Workbook for the Update " & Chr(10) & Chr(10) & wb.Name, vbYesNo) = vbYes Then
wb.Activate
VI_wb = wb.Name
I = True
End If
Next wb
But for some reason it only loops through .xls and xlm workbooks BUT not .xlsx
is there a way that I can loop through any and all open workbooks.
The reason I do this is because my update are based on many numerous excel workbooks with differnet extentions, and naming conventions and many of the come via email, I cannot use the eact naming convention
View 1 Replies
View Related
Nov 18, 2012
There are 2 buttons on my worksheet below each other. Each button has a size of a range (i.e. "G33:G34", "G36:G37").
This is what I would like to do:
1. Click on the first button
2. Copy A33:F42 and insert them below row 33
3. Move the buttons to the same position (10 rows down) on the sheet
4. Copy the existing buttons and put them in their original space (i.e. "G33:G34", "G36:G37")
5. Do it as many times as I click on the first button
I have this, and I have no idea to the remaining part...
Private Sub CommandButton1_Click()
Range("A33:F42").Select
Selection.Copy
Rows("33:33").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Range("B33:B42").Select
End Sub
View 4 Replies
View Related
Aug 5, 2013
The code below if I run once Hide the Range("H:FV,GG:IV") and shows the Range("A:G, FW:GF") And if I run it again Unhide the Range("H:FV,GG:IV") And Show all columns
Code:
Sub Hide_Unhide()Range("H:FV,GG:IV").Select
If Selection.EntireColumn.Hidden = True Then
Range("H:FV,GG:IV").EntireColumn.Hidden = False
Else
Range("H:FV,GG:IV").Select
If Selection.EntireColumn.Hidden = False Then
Range("H:FV,GG:IV").EntireColumn.Hidden = True
End If
End If
Range("A1").Select
End Sub
Above code is working with 2 cases now is it possible to add 3rd case Hide Or Unhide Range("H:GG,GI:HJ,HO:IV") in the same code, and shows the Range("A:G, GH, HK:HN")
Resume: my request
Step1-if I run macro First time it must Hide Range("H:FV,GG:IV") and shows the Range("A:G, FW:GF")
Step2-If I run macro Second time it must Hide Range("H:GG,GI:HJ,HO:IV") and shows the Range("A:G, GH, HK:HN")
Step3-if I run macro third time it must show all columns
And repeat same cycle all time Step 1 to 2, Step2 to 3 and Step3 to 1
View 2 Replies
View Related
May 11, 2007
I have a defined range "Values" within my worksheet, which have no content. Within an existing sheet formatting macro I'd like to force the user to enter values into the cells until all the cells in the range are populated. The values must be whole numbers.
I can get a simple msgbox to appear saying that the range must be populated, but can't add any data whilst this is displayed.
Ideally I'd like the message to be displayed all the time the range contains an empty value, enter the values in the background, then have the message disappear and the formatting macro continue when all the values are populated with correct data.
I reckon I need some kind of ‘loop’ procedure but could do with some pointers.
View 9 Replies
View Related
May 5, 2009
Work shifts run on a four-week, 28-day cycle always beginning on a Monday.
In 2009, the first such cycle began on Monday 12/1/09.
In my 2003 worksheet, I have the current year in A1. I want the date of the beginning of the first cycle in that year to appear in B1. This should update automatically when the year in A1 is updated.
View 9 Replies
View Related
Jul 16, 2006
I am trying to get a sheet to automatically calculate week numbers from a given date (start) and the current date, the problem I am having is I only want to cycle 18 weeks not 52.so weeknum wont work
ie
10 weeks after start date would return Week 10
18 weeks after start date would return Week 18
19 weeks after start date would return Week 1
25 weeks after star date would return Week 6
37 weeks after start date would return Week 1
etc...
View 6 Replies
View Related
Sep 24, 2007
how to calculate in data serie cyles the:
- Mean Amplitude
- The Time (minutes) cycle between Maximum and Minimum cycle values (If the Cycle value X Amplitude)
- Cycle Mean Time.
View 9 Replies
View Related
Feb 19, 2008
I have a data set that contains a repeating cycle. I want excel to find the first and second occurrence of the data crossing the zero axis and then report the time between the zero crossings. The data is not purely in ascending or descending order and often just changes from positive to negative or negative to positive without hitting the actual 0 point.
View 3 Replies
View Related
Feb 4, 2010
I got the following table.
http://img163.imageshack.us/img163/2972/oldnf.jpg
What formula could I use so that the amount under STP premium would display at the right cell under different time periods depending on the time of the trade date, just like the following images?
http://img687.imageshack.us/img687/5720/newcg.jpg
http://img168.imageshack.us/img168/413/new1zk.jpg
View 2 Replies
View Related
Jun 20, 2014
I'm using this formula (below) to add the hrs between 2 time periods (4:30 pm in cell I37 and 8:00 pm in I38, then the formula is in I39) and works almost every time even when the second time goes into the am hours, except in certain instances such as: 4:30 pm to 11pm show as 30.5? But sometimes it shows the correct number, 6.5
=(IF(I37>I38,I38+1-I37,I38-I37))*24
View 1 Replies
View Related
Oct 7, 2008
I have been working on solving this riddle since yesterday. What I'm trying to do is have Excel use today’s date on the computer to tell me when my Paydays are in a given month. Or have it tell me the next two or three Paydays based on Today's Date.
I can get Excel to calculate Every Two Weeks by using the formula =A3 + 14 then have each sequential field add 14 days to the previous fields date. However what I end up with is just a column of Pay Dates. Not what I'm looking for. I want to have an active page that only shows 2 or 3 future Pay Days. I want to use the function =TODAY() in my formula so that every time I open up the file it can calculate the next Pay Dates automatically.
I have been playing around with this formula:.....
All this does is tells me the First Friday of every month. This won't work for me because the Pay Periods are separated by 14 days not the 2nd and 4th Friday of every month. Here is an example of my Pay Periods: Sep 19, 2008; Oct 3, 2008; Oct 17, 2008; Oct 31, 2008; Nov 14, 2008; Nov 28, 2008; Dec 12, 2008; Dec 26, 2008; etc.......
View 5 Replies
View Related
Feb 10, 2010
I'm trying to calculate the total hours worked for two given periods over a shift , which can span two consecutive days ie. start 15:45 and finish at 00:15 the next day. Hours worked between 6am and 6pm are paid at standard rate, whilst hours worked between 6pm and 6am attract penalty rates. Hours are cacluated in 24hr time
I have attached a copy of the timesheet that we use so you can see exactly what I'm trying to achieve, and included most of the shifts that we have.
View 14 Replies
View Related
Nov 23, 2011
When using the Trend function, I can get the value for individual future periods. I then can get a total for the year by summing each individual future period.
What I don't know how to do is sum them all using one formula. For instance, If I know the values of periods 1-5, how would I write a formula that would sum the future values (in one cell) of periods 6-12 -- without having to sum each future period individually?
View 3 Replies
View Related
Aug 5, 2013
I have a list of email addresses with the periods stripped before the .com, .net, etc.
How to insert the period to go from example@mailcom to example@mail.com? Obviously the email addresses are of different lengths, but it's always 3 characters after the inserted period.
View 3 Replies
View Related
Dec 29, 2006
I am having trouble writing a Macro to delete multiple periods at the end of each cell. Each cell looks simiar to this: Blah Blah Blah................... I am using the InStr function to find the first period but it returns a 0 everytime. Here is the code I used to find the period. I want it to delete everything after the first period and store the value back in the same cell. Right now it just stores blanks.
Sub PeriodRemover()
Dim NewContract As String, Contract As String
Application.Calculation = xlManual
i = 2
Sheets("Product Listing by Contract").Select
Contract = Range("A" & i).Value
Do Until Contract = Empty
NewContract = Left(Contract, InStr(Contract, "."))
Range("A" & i).Value = NewContract
i = i + 1
Contract = Range("A" & i).Value
Loop
Application.Calculation = xlAutomatic
End Sub
View 4 Replies
View Related
Apr 22, 2008
I have a text value which consists of two periods ".". I want to pull the value in the middle. eg. From the text value in a cell "oakland.california.usa", I want to pull "california" in another cell. All the values in column are in similar format.
A B
1 oakland.california.usa california
Hope this is not duplication of any pre-existing thread, if it is, I probably don't know the correct keywords to query.
View 2 Replies
View Related
Apr 5, 2009
I have dates of the record add date to a database, and balance date cycle month.
What i require is loop through each record and return the next month end date of the balance date cycle month of the add date for each record. eg.
added to DB - balance date cycle month - Next balance Date
05 March 2004 - April - 30 April 2004
18 April 2003 - March - 31 March 2004
Refer sample file attached. I have populated the Next Balance date with the result required.
View 3 Replies
View Related
Jan 21, 2010
On the attached example i have a button on sheet1 which opens a form. On this form i have four pages of a multi-page control and below it i have a spin button. What i want is for when the spin button is pressed to the right then the multi-page moves up to the next page and vice-versa for the left spin button. How do i write this code?
View 2 Replies
View Related
May 13, 2013
I'm struggling to include a repeating 8 (or 4) weekly cycle in my sheet.
For instance, week 21 starts on 20-05-2013, than I would like to have the below cells filled untill 26-05-2013, following cells must be blank, untill 8 weeks are over, and the first date you see again is 15-07-2013, and so on. Using the MOD formula, I can get the first day of each cycle correctly, but I'm having difficult to get the next 6 cells entered and the next ones blank again untill 15-07-2013
I'm using now following formula, where B is the date:
Code:
=IF(MOD($B$264-B264;56)=0;B264;"")
but I need to nest another IF I guess that takes care of the rest.
View 3 Replies
View Related