Calculation Data Within Two Different Times
Jan 27, 2009
Im measuring arrivals of buses during a two hour period, for example 10 til 12 Within in this time i have 12 buses.
The Problem
What i need to do is calculate how many buses have turned up in a "rolling hour". This means taking a sample of any 60 mins within the two hours and calculating how many buses turn up. There needs to be a min of 6 buses in that 60 mins
In theoy there would be 60 "rolling hours" within a two hour period.
For example first 60 min is 10 till 11, second 60 min is 10:01 till 11:01 and so on.
View 8 Replies
ADVERTISEMENT
Jun 11, 2009
I have a spread sheet with 4 columns x 20,000+ rows running this forumla
=IF(FALSE=ISERROR(VLOOKUP($G2,$B:$B,1,0)),$G2,$H3)
The formula works perfect - the only problem is the calc times can take 10+ minutes ( and longer with larger data sets ) because the data sets are so large. Is there another formula or way to get the same result that would speed the process up?
View 9 Replies
View Related
Jul 2, 2014
I work for a freight company and have been trying to create a macro for a spreadsheet that I have to create every single day. I pull a report from a program called the AS400 and it sends me an excel spreadsheet with information about certain shipments such as close time and arrive time (which are in military time such as 16:00) along with driver names.
Anyways what I need to accomplish is to highlight the entire rows font in red if the driver arrived an hour or more past there close time. When I get the spreadsheet the military times are not showing in the HH:MM format under format cells. So I select the HH:MM format and try to do a formula such as Arrive time cell (M1) - close time cell (L1) to get the time difference it shows as #VALUE!. I've tried to convert it to different time formats and nothing works. The values just stay the same and will not allow me to do calculations with them.
At first I thought this was because the program was sending those values as text. I tried to use the date>text to columns>finish button on the columns but did not work. I've tried to remove the":" then use the HH:MM cell format but still wont work. I've even tried a time value formula to try to convert the values such as =TIMEVALUE(LEFT(A1,2)&ā€¯:ā€¯&RIGHT(A1,2)).
But nothing works it will not allow me to add or subtract from the time values no matter what I do. I am running excel 2010 on Windows XP the english version.
View 9 Replies
View Related
Jan 28, 2014
I have a cell in sheet1 (say, B2) in which I can key a date. Once I change that date, cell C10 updates (after I hit F9 to recalculate) with a new number based on the new date.
I have a list of dates on another sheet, from 1/1/2009 to 12/31/2013, all in column B. I want to produce VBA code that will run through each day, 1/1/2009 to 12/31/2009, in sheet1 cell B2 and take the output in C10 and place it next to each day in column B until it reaches the end (12/31/2013). I know this is possible but for some reason am having trouble coming up with the right looping mechanism.
You can imagine if I had to manually key in each day to get the desired output how tedious that would be.
View 3 Replies
View Related
Mar 7, 2008
I have a excel worksheet with the following columns: First name, Last Name, Email address, domain of email, product type, date registered. The list consists of about 50,000 entries. I want to sort the list by the domain of email(which I am able to do already) Once this is done, I want to find all instances of where a domain appears at least 10 times on the list(such as webmessenger.com appears 40 times, so I want to get that data).
For those instances where the domain appears at least 10 times, I want to pull those rows out of the intial list and put them in a new list(the new list will be sorted by domain and will only have people who have a domain which appears at least 10 times). To make this a bit more clear, The initial list I have is a list of people who registered to use the software my employer makes. We are trying to locate companies which may have many people using our consumer version of the software. When there is a large amount of people in the same organization using our software, it would benefit them to upgrade to the enterprise version due to enhanced managment features. By running this filter, I can see which companies have at least 10 users registered to use our software. Of course I will remove any Gmail/yahoo mail/msn/hotmail... pretty much any public email domains and just leave the ones that are obviously corporate emails.
So far, I think it probably has to be done with a pivot table... I was able to get a table that tells me how many instances occur from each domain, but I cannot get it to display the actual data(it just says IE. company.com 200, yahoo 120, etc... I need it to show me the 200 rows of company.com emails and extract them to a new sheet so that I can then follow up with company.com and see if they are interested in the corporate version.)
View 2 Replies
View Related
Feb 23, 2010
In my workbook I have about 20 sheets (less in the attached sample), and on most sheets I’d like to query data for each day and find an average value based on the time and then copy that result into another sheet. I’m not sure if I’ll need 2 macro’s for this or if one can be used.
Here’s a quick description:
Assuming that I am currently in the sheet I want to run the macro, then I will either input “1:45” or “0:45” into a popup box, or I could always simply input the 1:45 or 0:45 in the code itself. I’m flexible
1:45:
If I input 1:45, then I’d like the macro to find the first 1:45 in Column B and the value in the same row in Column F will be used in the calculation. Once 1:45 is located, then the macro moves up to find 22:45 in Column B and the value in the same row in Column F will be used in the calculation.....
View 11 Replies
View Related
Jun 23, 2013
I have a table with 500 entries which is some physical properties for some chemicals. What I am needing to do is get something to find out what chemical formula the user has typed in another cell on a separate sheet, then VBA finds the component on this table and picks out information from columns within that row. Some of that data will then be used to do a calculation. The user can select up to 20 components, so VBA needs to be able to do it for 1 or anything in between 20 components. The data which I need to use for further processing is within columns D to J.
View 1 Replies
View Related
Apr 8, 2014
I'm looking for a formula that will calculate the difference in times between specific times while working with a 24 hr clock. Please see details below:
E3 provides the start time of 4:00
H3 provides an end time of 15:30
If an employee works betwen the hours of 0:00 (midnight) to 5:59, this is considered DIFF hours and is therefore the number I am seaking. So for the data noted above, the total DIFF hours worked is 2 hours.
View 7 Replies
View Related
Jul 11, 2014
I have got historical intraday-data of a stock index and first of all need to summarize them by seconds: The data looks like that:
time price
08.00.00 159
08.00.00 153
08.00.00 148
08.00.01 157
08.00.01 152
08.00.02 167
08.00.02 151
08.00.03 155
08.00.03 154
08.00.03 154
So I want to calculate the average price per second. Is there any formula to tell Excel that it should sort it by second and further calculate the average price of it.
View 5 Replies
View Related
Oct 3, 2006
i am trying to find the formula which will calculate information that is between two dates. for example i have the dates Jan'05 right through to Dec'06 and in each month i have different values eg, Jan is 5, Feb is 10 etc. i need to find a formula which will calculate the data between Aug'05 and July'06.
View 8 Replies
View Related
May 14, 2014
In it I have a list of different profiles (From autocad Civil 3D). With a column for the station value, and a column with the elevation. These profiles are arranged all below each other. In the example xls, I've limited it to 2 example profiles to make it a bit clear. The 1st few columns come from the export out of Civil 3D (with empty rows between them, but these are easy to delete). For each station of the profile, you have an elevation
What I need to do is calculate a 3D length for each profile. So manually you can do this with A=(B2+C2)^1/2, and then make a sum. Which is not really a problem if you have a list with 2 profiles. But sometimes we have a list with 100 profiles.
Optionally, it would also be handy that we then get a list in another sheet, with in 1 column the profile names, and next to it the 3D length.
My main question is: Is this possible with VBA? (I would assume it is..) Next, it would be handy if I could be directed in the right direction to produce these routines, because I don't have that many experience in vba.
View 3 Replies
View Related
Oct 16, 2009
Suppose you have a large database, which consists of high frequency minutes data, you need to calculate differences in values between each different time intervals, e.g. from 1 min to 10000 mins.
the format is looked like below
1 min aaa
2 min bbb
3 min ccc
4 min ddd
.................
......................
More specifically, what I am supposed to do is to calculate aaa-bbb, bbb-ccc, ccc-ddd, and then aaa-ccc, bbb-ddd, and then aaa-ddd and so on.
I know the VBA has a function to do repeated executions but am not sure how to adjust the time intervals.
View 9 Replies
View Related
Oct 5, 2009
Im trying to work out a function that will calculate the average accross a 3 column array. Obviously there is but I need to make any cell's with 'Free' give a value of 0.
I need some kind of IF("Free",1) type thing, to run before the average calculation, but I dont know how to put it together to make it work, I thought about a Loop, but then how do I make sure it only goes to the next cell in the selection?
View 9 Replies
View Related
Mar 7, 2009
I need a formula in excel to convert start times and end times and minus out lunch time taken and then give total hours worked. For instance,
Column D Column E Column F Column G
Start End Lunch Total Hours Worked
10:01AM 7:08PM 1:01 (formula to convert hours worked)
View 9 Replies
View Related
May 30, 2014
I'm trying to improve the code in which I need to paste data x times. Right now I have it hard coded but it will change. How could I avoid the offset paste (1,0), (2,0) etc?
Code:
sub Copy
Dim DataPaste As Long, GetRow as long
'GetRow found in Worksheet "Input"
[Code]....
Basically I would like to copy and paste the data x times below the last paste where x is in sheet5.range("A1") for example
View 2 Replies
View Related
Mar 5, 2013
I have an excel spreadsheet that performs a particular calculations using a large set of data. However, I have over 1000 sets of data that need to be feed into this sheet and obtain the output calculation. Obviously I don't want to have to copy and paste in each new set of data to obtain my result as this would take a very long time. I am brand new to VBA, so was wondering if there is a way to write code in VBA that will automatically perform these calculations for one data set, save the output into a cell, and then move to the next data set and so on?
View 4 Replies
View Related
Jun 18, 2013
I need to average data following the format below by average per week by week/store combination e.g. wk 1/store A average is 6.
Week
Store
Sales
1
A
7
[Code] ..
I can easily use SUMIFS to achieve this, but I have a large amount of data between the weeks of 1-52, a dozen different stores and I will be adding to this. I don't want to have to enter new SUMIFS every time I enter a new wk/store combination. How do I get this info to automatically calculate?
View 3 Replies
View Related
Jul 30, 2007
I'm using Excel 2003 with WinXP SP2.
I'm trying to make a spreadsheet to calculate my GPA for my studies. I can get everything to work fine except I want to be able to calculate an adjusted GPA based on a certain value of classes to drop.
The way it would work ideally is that I would be able to search/sort a data set and if it contained "X" number of entries then the "Y" number of lowest marks would be omitted from the AGPA calculation.
I'm having trouble designing a function/formula or scheme to sort the data range, and identify the lowest "Y" number of entries and recalculate the GPA without using them.
View 9 Replies
View Related
Feb 26, 2010
I have a list of data, integer values ranging from 0 to 36. Imagine a Roulette wheel. The list is long, with over one hundred data points. I would like to view the first 14 data points, and count how many times each value occurs. How many 0's? How many 1's? How many 2's?...How many 36's?
Obviously, many values will have 0 occurrences. Most will have 1 occurrence, some 2, and maybe one or two will have 3 occurrences. I doubt we will see a value with 4 or more occurrences, but it is possible. With this accomplished, I will then note the results. So, that accomplishes the first 14 data points, call them 1-14.
Then, I want to move down the list 1 data point, and repeat the process. So, here I am looking at data points 2-15. Basically, it's the same set of data, with the first point missing, and a new point added on. I will then note the results. I want to continue doing this until the last 14 are viewed.
View 3 Replies
View Related
Jul 18, 2013
I'm trying to collate data from two sheets (sheet1 & 3) , paste it on sheet5 and do some calc. But the macro keeps copying the same row after 2 iterations. Also the find function stops working after 1st iteration. Not sure what to do
Sub Macro17()
'
' Macro17 Macro
'
'
Sheets("Sheet1").Select
Range("B3:L3").Select
Do Until Selection.Row = 10000
Selection.Copy
[Code] .........
View 5 Replies
View Related
Sep 4, 2009
I have instances where my Y variables sometimes contain a zero in the data and i need a formula to skip over that data point in the LINEST calculation.
Y variables are in Row 1, Columns A:E
X variables are in Row 2, Columns A:E
The following formula is returning a #VALUE! error: .....
View 9 Replies
View Related
Aug 21, 2013
It will be easier to explain in an example:
A B
Time (hh:mm:ss) Digital
1 10:03:00 0
2 10:03:01 0
3 10:03:02 1
4 10:03:03 1
5 10:03:04 1
6 10:03:05 0
[code]....
From the data above I am searching for the duration of when the digital column says '1', i.e my function = A5-A3 which would output 2 secs or 00:00:03 & likewise A9-A8.
The problem I have is that the digital signal is staggered and does not always have the same frequency. I have over 6848 lines of time to check so to do this manually would take me all day.
View 8 Replies
View Related
Mar 6, 2014
Current program i use follows these steps:
-Empty cells
-Remove comments
- Fill Headers
- Retrieve Data (From the path Results (a subdirectory))
- Sort on date and time (column D)
My Problem: The programma now used retrieves every file in the subdirectory again and again.
If it has like 100-200 files it takes a very long time.
Is it possible to make a function for this that only retrieves files when the filename is not imported already? (Title is in the D Column)
Wish: a function that retrieves only the required data and skips measuring data thats already there.
View 2 Replies
View Related
Jan 29, 2014
I have a spreadsheet which monitors the hours employees work - one of the rules is that an employee must have 12 hours rest between shifts...
I am using the below Data Validation formula in column I to highlight when an employee has less than 12 hours rest and an alert to appear
=OR(AND(I4-B4=0.5),AND(I4-B4>=0,I4-B4>=0.5))
Now this works perfectly with the exception of when an employee finishes at say, 18:00hrs on a Friday, and starts at 22:00hrs on a Saturday - Excel Calculates the Rest hours as 04:00, when it should be 28:00
I've had a suggestion to use the following:
=I4+I2-B4-A2>=0.5
(I2 being the saturday date, A2 being the Friday date) - this does work but only for Cell I4, If I copy the Data Validation down the column all cell references change - is there a way to keep the I2 and A2 in the formula without having to retype in every row?
View 1 Replies
View Related
Jun 28, 2014
I have a table with two columns.
PartNumLoaction
CCN01905J6
CCN01905J100
CCN01905J200
CCN01905J300
CCN01905J400
CCN04455J800
CCN05363J3
CCP01960C1
CCP01960C3
I would like to create another table (in a new sheet) which displays the number of times each PartNum appears in the first table.
PartNumQTY
CCN019055
CCN044551
CCN053631
CCP019602
The amount of rows in a table is variable and can reach thousands of rows.
View 2 Replies
View Related
Mar 25, 2009
I am trying to come up with a formula that will allow the commission calculation to be done automatically once data is inputted in cell A2 and E2. I have tried IF statements, but can not figure out how to make it work. I am not able to figure out how to get cells F9 and F19 to work with the proper formula.
View 4 Replies
View Related
Feb 20, 2014
Data extract from sheet to sheet through column header values, i have set of data on sheet1,2..loop end of sheet
i want pull column data from multiple sheet column values into masterdata sheet depends upon column header values assigned in masterdata sheet.. my code works fine! but i want pull data if column header repeats more than one also
SO_NBR this is one heading in multiple sheets i cant pull col values not more than once under if SO_NBR repeats more than once.
[Code] .....
Find the attachment mentioned as expected result sheets is my requirement : HEADER_UPDATES_AIO_$.xls
View 12 Replies
View Related
May 1, 2012
I have a sheet that contains the following columns:
Invoice, Document #, Date, PO #, Part #, Part Description, Quantity, Net Amount
Based on the quantity in the row I need to copy the row, and insert it n-1 times. So if the quantity is 5, I need to copy and insert the data below the original row 4 times for a total of 5 rows of data.
I plan on firing the macro with a button as the data will change month to month.
Using Windows 7 and Excel 2010
View 2 Replies
View Related
Aug 25, 2009
I have a formula that I use to tally data and return the number of times a particular value is present in column C.
IF(COUNTIF($C$2:C2,C2)=1,SUMIF(C:C,C2,E:E),"")
I copy this formula down the sheet until arriving at the last input in column "C".
Can someone tell me how to write this in code. All I would like visible in Column "F" is the output not the formula.
View 9 Replies
View Related
Nov 19, 2008
make a calculation(addition) and use the answer to multiply against another addition calculation....
The sum of (Monday!A1:A4) multiplied by the sum of (Monday!B1:B4) plus (Tuesday!A1:A4) multiplied by the sum of (Tuesday!B1:B4) and so on.
View 2 Replies
View Related