Table Min / Max During Calculation Cycle
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
ADVERTISEMENT
Jul 3, 2014
I have created a pivot table from raw data. The result is correct although i need to alter something.
The values that show (615 & 300) are in minutes. I need to divide this by 60 to get hours. The resulting chart will then show hours and not minutes. The main reason is that minutes will be into thousands very quickly and hours are more meaningful.
Is there a way to do this within the pivot table.
Attached link to file:
[URL]
View 2 Replies
View Related
Aug 19, 2014
I set up my pivot table but on the Value area I need to make a multiplication with the total values, not just sum it all up.
Normally in the Value area you can choose Sum, Count, Average, etc, but you can't multiply it with another cell. There is a "product" option but it multiply the total values together, it doesn't ask for another cell value.
PT-Value-Field-Settings.png [URL]....
View 2 Replies
View Related
Apr 25, 2014
Calculating usage...
Take the Current date and I need that inventory ---- find the date 7 days before this date ---- get the inventory for that date --- current inventory - previous inventory / 7 will give me the daily usage... the data will be in a pivot table so I need to make sure it doesnt change the usage when moving the table around...
View 1 Replies
View Related
Apr 16, 2009
i have a database of the kind:
Model Version Color Store
1 a zz HH
2 b xx QQ
3 c yy OO
4 d ww PP
I need to obtain in the y axis the model, and in the x axis the store.
The data per each model and store should be: the version and color.
I'm using Pivot table to do that, but i'm only able to obtain the "count" (or sum or other formula) but I'm not able to obtain the content of the cell.
Example:
Store HH PP
Model
1 Version a d
Color zz ww
2 Version b c
Color xx yy
View 9 Replies
View Related
Aug 2, 2013
I am trying to find expected proportion of code per country by looking at current values. I have a list of countries and associated classifications (0-5) with counts, similar to as follows:
Country
code
count
USA
1
65465
USA
2
54651
USA
3
65411
[code]...
I am interested in creating a pivot table with the average of each code as a proportion of each country. The final table would be expected proportion of codes. The pivot table for this set would look like this:
Row Labels
Average
1
5.4%
2
3.9%
3
4.7%
[code]...
Mean per code of the proportion of code per country
View 1 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
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
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
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
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
Apr 27, 2009
I have a sheet with hundreds of rows of data. I created a UserForm to cycle through each row of data. I am not sure how to do the cycling though. The UserForm has ten textboxes. Textbox one contains the value in cell A1 of each row. I know I could use vLookup to populate the remaining textboxes in the userform based on the value of textbox1 - but I wanted to either create a scroll bar or "NEXT" botton that would cycle back and forth retreving row data based on the value in cell A1 of that row.
View 9 Replies
View Related
Aug 28, 2006
currently i am putting together a vba code to do the following:
1. Cycle through 3 sheets and waiting for 2 seconds on each sheet
2. Refresh after the cycle has finished
3. and then be contiously looped.
4. a button or something to make it stop looping.
This is the code i have got thus far:
Sub SwitchingSheets()
NewHour = Hour(Now())
NewMinute = Minute(Now())
NewSecond = Second(Now()) + 2
WaitTime = TimeSerial(NewHour, NewMinute, NewSecond)
Sheets("Sheet1").Select
View 3 Replies
View Related
Dec 1, 2006
I need it to cycle through whole numbers for three variables whose range I can define. I need this macro to test the result of all possible combinations of A, B and C, as is shown in the attached file. The initial range boundaries for each variable are as follows:
VariableABC
Minimum1408
Maximum510012
So the macro should start with the following combination (1,40,8) then (2,40,8) then (3,40,8) etc until it reaches (5,100,12). I need the results for each combination to be posted at a separate sheet next to the corresponding combination.
View 9 Replies
View Related
Feb 15, 2013
I have a list of Users in Column A on Sheet 2 and a list of Extension Numbers in Column B.
I'm looking for a way to populate a Cell (F5) with a User and Cell (H5) with the Extension number. I then enter Data into Cell (G3), (G9) and (G10). I would then on enter on Cell G10 update the relevant columns in Sheet 2 and move on to the next user.
View 7 Replies
View Related
May 26, 2009
I am trying to look through a multiple selection of cells (in Target range) and compare to see if these are Integer. I am failing to be able to cylce through the selected cells and check their value. I am sure it is VB 101 issue... but I am lost at cracking it.
View 2 Replies
View Related
Nov 9, 2011
I need to run this on all cells in column a not just A2...:
Dim ie As Object
Set ie = CreateObject("internetexplorer.application")
Dim srchtrm As String
srchtrm = Range("A2").Value
ie.Visible = True
ie.Navigate "http://myurl.com=" & srchtrm
I also need to add to this code an option for finding text on the particular URL before the cycle is completed and looped to the next cell.
View 5 Replies
View Related
Sep 20, 2012
I have the below code that i am using to generate a random number between a user defined lower limit and upper limit (these limits are set in cells "B3" and "B4" in worksheet "DRAW"), the random number that is generated displays in cell "B7" on worksheet "DRAW".
The code also allows for the draw result to be stored on a second sheet called "DRAW HISTORY", on this sheet the draw result, date and time are recorded (the date and time are stored on sheet "DRAW" in cells "C20" & "C21" and these values are pulled to the result sheet by the macro).
What i would like to happen though is instead of the random number displaying instantly i would like the numbers to cycle for 3 seconds before stopping and the result being recorded. A much better visual effect than an instant BANG here is the winner.
here is the code i am using to generate the random number and record the result:
Sub testRandom()
Dim aRow As Long
Sheets("DRAW").Range("B7") =
[Code]....
View 3 Replies
View Related
Jul 4, 2014
I'm try to do a what IF Formula, so I can automatically add the cost into the right year for a lifecycle cost
My criteria is in column K I have either New Build or Existing and column AT I have year 12 of the lifecycle and column AZ I have year 18
And what I want the result to say is IF Column K Say New build I want the value of the first maintenance year to start in year 18 and column k say Existing I want the value of fist year Maintenance to start in Year 12
I already have this formula in the Column AT&AZ working out he value
IF(ISERROR(MROUND((AQ$1-$Q2),$P2)),"0",
IF((MROUND((AQ$1-$Q2),$P2)+$Q2) = AQ$1,$AF2,"0"))
View 4 Replies
View Related