# Formula To Automate Creating Break Times

Jan 15, 2012

Rules:

First rule is that no breaks can overlap.

1st Break is 40 Mins.

2nd Break is 20 Mins.

1st Break is at least 2 Hours After Time-In.

2nd Break is at least 2 Hours Before from Time-Out.

Each Employee might have a unavailable time for breaks.

Not sure if it is possbile to create a formula like this, or I might need an Excel Wizard to do this.

ADVERTISEMENT

## How To Automate Copying Of Range Of Cells Into Same Row 365 Times

Feb 1, 2014

I am trying to capture data for statistical analysis, but have hit a snag. As shown in attached sheet I have each day for the year broken down into hour time slots into which data will be added. As I will need to come up with a number of similar sheets in the future I was wondering if there is a way to automate through vba, a quick way to copy down the hour slots for each day, 365 times, rather than the laborious task of copy and paste manually.

## Excel 2010 :: Lunch Break Times

Apr 11, 2014

I am using excel 2010 and I am trying to find a formula whats going to give me added break with a set time but anything over a set time doesn't. I want it over 10:58:00 and under 11:32:00. I've got the numbers and tried with a formula but all whats happening is that all the data is adding 30mins break to the end time.

The sheet is using live times and data so the start times vary as do the due time.

## Excel Formula To Calculate Difference In Times But Only Between Specific Times

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.

## Creating Staffing Schedules Based On Train Times

Jun 16, 2006

Attached is a sample schedule form. I recived the data on the "Working" sheet in a Word file that is emailed monthly. THis shows a full month of arrival/Departure and passenger counts by Time of Day. I need to develop

1. a driver schedule that would indicate the time the driver needed to be at the station and how many passengers to collect. There could be both and arrival and a departure trip at the same time so this would also need to be considered. The sample data shows when passengers arrive and when they are expected to leave. Some will leave the day they arrive some the next day. Ideally I would like to be able to plan the number of trips to the station per day and at what times, whether it was an Arrival, Departure or a combo trip delivering departing passengers and collecting Arriving passengers on the same trip.

2. A housekeeping schedule also needs to be created showing how many rooms need to be available for passengers and at what times. It would also need to indicate if the passenger arrives and departs on the same day or if they stay over.

## Creating A Timer To Measure Macro Code Execution Times

Sep 7, 2006

I am looking for a way to measure how long it takes to complete a sub routine in VBA. I have code which posts data to matlab and then calls it back. What I need to know is how long does it take to complete each subroutine.

create a code which will measure this? I need to measure the time taken in 100ths of a second.

Is there any simple code to complete this? I am pasting a sample of my code which is using Matlab as a COM server.

Dim Matlab As Object
Dim MReal(10, 0) As Double
Dim i As Integer
Dim j As Integer
Dim MImag() As Double
Dim value As Double
Dim RealValue As Double

I am sure I woould need to declare the timer but I do not know where and I am not sure of the syntax.

## To Automate A Formula Sheet

Feb 16, 2008

I am trying to automate a formula sheet used by truck drivers to determine how many hours are available to work as they cannot work over 14 hours in a day or 70 hours in 8 days. This must be charted daily, including days off. Taking two consecutive days off resets the 70 hour rule. So...

Col B2:B8 Enter the number of hours worked each day.
Cell C8 Sum B2:B8 except when there are two consecutive zeros entered during the seven days being counted, then count only from after the second zero. (ie. b2=6, b3=0, b4=0, b5=8, b6=10, b7=7, b8=11 only sum(b5:b8)). So I am looking for the formula to to sum under this condition.

## Automate Formula Copy/Fill-Down Until Last Row

Dec 6, 2009

I have some formulas that combine template text and values from cells in that row to result in text that I then Copy and use in another place. I am trying to convert that to a Macro.

My Skills are Novice -- I have searched Google and Tutorials and it seems that my usage is not common so, I have not found answers to help me move ahead.

I'm working with a simplified version of what I want to do to eastablish a
Working model that I can modify and expand. I had a macro that ran to completion but I abandoned it. I realized that I was on a Wrong Track. It was created from recorded macro sections and googled routines and very clumsy.

Heres my Scenario

If my Excel Cells were

Cell A1 = 135252
Cell B1 = \$13.95
Cell C1 = 3
Cell D1 = Oversize

I want to run a Macro from E1 that would Result in text of

Our Stock Number is 135252 - The Price is \$13.95.
We have 3 in stock. Type of Packaging is Oversize

being left in Cell E1.

I would like the Macro be able to run on other rows as well when launched from Cell E of that row.
My Goal would be to make the macro work on a range of rows by Highlighing Cell E in those rows.

My Excel Formula to accomplish the same thing is -

="Our Stock Number is "&A1&" - The Price is "&B1&".
We have "&C1&" in stock. Type of Packaging is "&D1&"."

If I could get this much working, I think I can expand and edit to encompass my actual application.

## Pivot / Formula To Right / Page Break

Oct 5, 2009

I have a simple pivot. In the columns to the right I have a few formulas. The user simply sees the pivot and extra columns---they have no idea they are looking at a hybrid type thing and they DO NOT EVER manipulate the pivot in any way other than choosing a particular DEPT form the page area.

I set this thing up by first select: ALL for the Dept and the dropiing my formulas down to the end of the sheet (actually a few hunded lines after that to allow for some data over the year)

The trouble is that if the user picks a particular dept, at the end of the dept data, not only does the user see the formula extended down numerous row (I can use cond formating to make the font white, ie hide them) BUT worse when printing it prints numerous extra pages.

So, is there a way to only make it print to where the pivot data ends.....not where the formula ends..WITHOUT the user having to do a SELCT PRINT AREA type thing.....

Ex: User picks Dept 1003, data ends after Code 99, formulas extend down past that in case user selects ALL Depts. We want printing to stop after Code 99 though....NOT to print a bunch of 'extra' pages....

## Formula To Split Cell At First Break - Space

Nov 13, 2012

Formula to split a cell at the first break/space and to keep the rest of the cell contents together? For example to separate addresses from the street and street name.

Eg.

A1
1111 AAAA BBB

into

B1 C1
111 AAAA BBB

I have tried to use text to columns but as the cell contains three or four words I don't want to have to rejoin cells afterwards.

## Excel Formula To Break Names In 3 Columns

Jan 24, 2014

I have data from Row A1 to A3 with following names, I need formula (Dont want to use text to column or VBA code)

Atif Malik Khan
Khalid feroz sahb
Ali ahmed khawaja

I want that 1st, 2nd and 3rd name should be shown in Column B, C, and D.

## Automate A Date Referenced In A Formula Pointing To Another Sheet

Nov 14, 2005

I am trying to reference a date in a formula that points to a sheet name.

See Below.

A B
November 11, 2005 ='11-11-05'!\$v\$35

How can I automate the date to pull from column A and place that value in the date for column B? Column B is the name of a different sheet in the workbook.

## Formula Link Break For Countif And Averageif Statements?

Jun 5, 2013

I have simple Countif and Averageif formulas that I would like to have linked to variable data in cell E6 on the Assumptions (2) tab however, the formula is not taking the cell as the criteria and only taking a hard number when I am using >=.

The example would be: I3 needs to be able to use the data changed in E6 for the >= number instead of the hardkey 29...

## Formula To Show The Value Of One Cell Based On The Value Of Another To Automate Some Internal Processes

Nov 3, 2008

I'm trying to get a formula to show me the value of one cell based on the value of another to automate some internal processes. Cell J3 returns today's date, then J4 says what week number that is. J5 concatenates the two to make the look up. Column A is named range "PN", and columns C onwards are named ranges to match the column heading.

What I'm wanting is for the result in test cell 2 (J8), is to return the stock requirements for the current week, based on the result of cell J5. I can do this by using nested IF statements, but that would be 8 cells to calculate, then another one to find the cell that has a value. If there a way to get Excel to recognize the value in J5 as a range name, so it just needs the one formula?

## How To Break External Reference Link Without Converting Formula To Value Within Sheet

Jul 1, 2013

I have a formula in a cell which is refered to other cell within the same sheet and also to other sheet from other file. say

C1 = A1+B1+data file c1 Data file is another file in other location.

I was trying to break a external reference link (from Data File) from Data _ Edit Link, but it is converting all the formula to value. How is it possible to break only the external link without damaging the formula within the sheet say c1 = A1+B1+26 (value from data file c1)

## Page Break By Asking The Input File For Page Break To Be Done

Dec 9, 2008

The code which you provided works fine no problem for a page break. I need to run the macro for the page break by asking the input file for page break to be done.

For Example, If excel filename "A" contain the code which you have given need to ask to input the filename "B" and process need to be done in file "B".

I have added some code to your code which you provided but it gives error message "1004" "Method 'Range' of object '_Application' failed" at following line :

Set rng = oExcel.Range(Cells(2, 2), Cells(Rows.Count, 2).End(xlUp))

## If/Then Formula With Times

Apr 1, 2009

F11 = 4:00 PM
G11 = 2:59 PM

I need an if/then formula that will take F11-G11 and then if the difference is greater than 61 minutes to place a "1" in H11.

I also need a formula in V11 if H11 is blank then use formula =IF(F11>G11,1,"").

## Formula For \$ 3.00 Times 40%=1.20, 3.00 - 1.20

Apr 27, 2006

I have \$ 3.00 in cell G9 and have a percentage of 40% in another cell B9 (I would like to be able to change the 40% in this cell if I have to). I would then like to have the answer (\$3.00 - 40%) \$ 1.80 posted in a third cell below G10 What would be the formula for this?

## Macro To Automate Multiple "IF Formula"

Aug 17, 2007

I have a worksheet of 5 columns. What I would like to do is subtotal an amount in column d, where the item code in column b are the same. Lets say there are 5 rows with code 8150 in column b, I want to add all these rows up BUT ALSO add up any rows which are 8150+1 (x+1) i.e. 8151. All transactions where the code in column B, x + (x+1) = 0. All true results should then be cut and pasted into a new worksheet (one worksheet for all transactions that are true).

e.g.

8150 1233
8150 12
8150 644
8151 -2084
8151 -10
8151 -205

Total of above amounts is zero, therefore cut and paste to new spreadsheet.

Now that I think about it, its actually quite complicated.

## Formula That Counts Between Two Times?

Dec 19, 2013

I have data over the last 170 days. Each entry has a time stamp. I would like to count how many entries there are between 7:45 am and 2:45pm. A total count across all 170 days is needed, but it would be great if I could break that down by calendar day (i do have that as a column).

Here is a sample of the data:Friday11/15/1307:08AM

Friday11/15/1307:08AM
Friday11/15/1307:16AM
Friday11/15/1307:16AM
Friday11/15/1307:46AM
Friday11/15/1307:46AM

And the sheet has dates starting in June and ending in mid December.

## Formula For Start Times

Oct 7, 2006

id like a formula that enter "1" into a field if i start after 00:00 and before 03:59 am

so in d4 is my start time and M4 is where i want the formula to go

i tried this formula but did not work

=if(d4>="00:00",<"04:00",1,0)

## Use A Formula A Set Number Of Times

Feb 3, 2009

Is it possible to determine how many times a formula will be used? Here’s my problem.

I have items that are bought, and then altered. So I need a cell to determine how any times my ‘IF’ formula is used. My current formula is:

Formula entered into D3.

=IF(D2>0,D2,””)

Row 2 is the amount and Row 1 are dates.

If I drag the formula to the right, E2 will be equal to 0 so will enter 0. But I need it to say what ever is in D2 3 times. (As this particular item takes 3 weeks to do) So D2 & E2 & F3 will all have whatever was entered in D2.

## Formula For Most Times Name Appears And Percentage

Dec 19, 2013

The attached spreadsheet is a sample of a master sheet I need to maintain. Keep in mind that the spreadsheet has hundreds of names on it and 10 sheets in the workbook. What name appears most in the "person who called" column, then I need to know out of all the people who called, what percentage of calls he made....

I have to do this on each sheet, so if it is possible to have it work for all the sheets.

## Some Times If I Do A =if( ) Formula It Doesn't Work

Mar 12, 2008

What am I doing wrong here. Some times if I do a =if( ) formula it doesn't work. For example, look at the attached picture. Cell K63 should say "End of Run". But it doesn't, What gives?

Also I have had before where i do =IF(X62>\$O\$2,"End of Run", 0) (and \$O\$2 =81) and the cell when X62 is 81, not greater than. I know I can to >=, but thats not what I am doing.

## Copy A Formula Several Times, Changing Its Value

Nov 28, 2008

I have some groups of data. Each group are 5 cells: ........

What I want is to make a formula to sum the five numbers of each group, then: =sum(a1:a5). but, how could I copy the formula to make Excel understand that I want the numbers from a6 to a 10, and from a11 to a16? I try to make it with left click in the square down at right, but it just add one value to each cell:

It makes this: ..................

## Formula To Calculate Overlapping Times

Mar 25, 2014

How to calculate overlapping times. I have found a few formulas on here I have tried to reproduce with no luck. This thread is similar to my issue.(How to calculate the amount of overlapping time) I need a non VBA format.

I need to know what times are overlapping; I need to see when two people are working active cases at the same time and how much time is overlapping. This is a huge spreadsheet with several rows of data. At this moment I am dong it all manually.

Here is a sample of what is looks like. As you can see the first line is overlapping with the second line by 8 minutes into the next case.

NAME
DOS
Start time
End Time

Person A
2/3/14
6:40
7:38

[Code] .....

## Filling To Right So Don't Have To Edit Four Parts Of Formula 350 Times

Jan 19, 2014

I have this huge formula and I want to run it in one row, across 350 columns:

=IF(IF(ISERROR(INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(3:3))-10,1)),"",INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(3:3))-10,1))="","/////",IF(ISERROR(INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(3:3))-10,1)),"",INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(3:3))-10,1)))

The only thing I need to change from one column to the next is the four places where it says ROW(3:3). I need that to ratchet up as it goes across to the next. The cell to the right should say:

=IF(IF(ISERROR(INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(4:4))-10,1)),"",INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(4:4))-10,1))="","/////",IF(ISERROR(INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(4:4))-10,1)),"",INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(4:4))-10,1)))

Then the next cell to the right should say:

=IF(IF(ISERROR(INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(5:5))-10,1)),"",INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(5:5))-10,1))="","/////",IF(ISERROR(INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(5:5))-10,1)),"",INDEX('Allocated & Spent'!\$G\$11:\$G\$307,SMALL(IF('Allocated & Spent'!\$F\$11:\$F\$307="x",ROW('Allocated & Spent'!\$G\$11:\$G\$307)),ROW(5:5))-10,1)))

etc., etc.

How can I fill across so those go up and I don't have to fill in those four numbers 350 times?!

## Formula To Add All Of Times If Text String Contains Word

Jun 11, 2013

I currently have a large amount of data extracted from a performance tracking system. The columns I am concerned with are Page Title and Time (the time it takes the system to navigate to the this page).

I am trying to create a dashboard to show:

Webpage Title (each unique instance of the webpage)Aggregate Time (total time it takes for all instances)# of Hits (Each time the value appears in the data)Average Time (this formula I can handle; Aggregate Time/# of Hits)

The major issue is that the webpage is extracted as XYZ001 -- PAGE1, XYZ439 -- PAGE2, XYZ854 -- PAGE1, etc. Basically, I am only concerned with what comes after the --.

Here is an example of the two tabs.

DASHBOARD TAB:

Page Title
Aggregate Time
# of Hits
Avg. Time
PAGE1

[Code]...

Basically, I am looking for a formula that says,

For any instance in the Page Title column that contains PAGE3, add the amount in the Time column (i.e., 1.2 +.5).

## Time Difference Formula Where Both Times In 1 Cell

Aug 14, 2007

I need some IF formula I believe that will yield an answer between 1 - 5. I'm not swavey enough with these things to figure this one out... trust me I tried and it keeps getting more confusing for me.

If the time worked is between certain time criteria then it would equal 1 - 5 depending on the time.

Example: If I work between the hours of 5am and 1pm then I would be in the Open/Mid range and would need to equal 2. If I only worked a few hours and my hours fell only between the Mid range then it would equal 3.

Then based on that... It would automatically fill in on the deployment charts... My name would show up on the Open and Mid Deployments under the task chosen for me to do that day.

I've attached a small sample of what I am looking for to kind of help show what I need. The highlighted areas are the areas I'm not sure how to do.

## Macro Loop – Find Specific Times, Extract Date, Average Values Of Times

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.....

Copyrights 2005-15 www.BigResource.com, All rights reserved