Increase/Decrease Times By X Hours

Aug 2, 2008

in speeding up the below code as it does not seem to matter whether I use For, If loop etc - it runs too slowly. Basically we have one sheet which is input in a different timezone that needs converting to GMT... since daylight saving I wrote some code to cover the +/- 1 hour difference (this seems to work quite well) yet when it comes to converting the actual cells it runs incredibly slowly. I appreciate any help but its only the code after "Sheets("data").Unprotect" that i think needs changing. The time stamp is in column 7 - I hope this makes enough sense - which then gets converted by either 4.5 or 5.5 hours dependent on british summer time.

Sub TimeConvert()

With Application
.Calculation = xlCalculationAutomatic
. ScreenUpdating = False
.DisplayAlerts = False
.EnableEvents = False
End With

Dim FirstDate As Date
Dim Position, DayIndex, lgrow, lstrow As Long, TargetMonth As Long, Stweekday, Enweekday, Tdate As Date, TargetYear As Long, cell As Range
Dim bst As Boolean

TargetYear = Year(Now)
TargetMonth = 3
Position = "L"
DayIndex = 1

View 3 Replies


ADVERTISEMENT

Increase / Decrease Of Value Set?

Dec 11, 2013

I'm dealing with the following problem. Say I have a set af values:

A B
1 567
2 546
3 567
4 554
5 572
6 543

I can easily determine the average of the values in column B (=AVERAGE(B1:B6)) But I also want to know if the average is increasing or decreasing without making a chart and trendline. Concrete: I want the cell with average (say B7) to turn green when the trendline has a positive growth and red when negative.

View 2 Replies View Related

% Of Increase - Decrease - Formula

Sep 18, 2006

Simplified:
I have a this years total in A1, last years total in B1, difference +/- in C1

$1000.00___$800.00___+$200.00___+%
$800.00___$1000.00___<$200.00>___<%>

I am trying to get a % of Increase/Decrease (Between A1 and B1) in D1.
Not as a dollar amount but as a %.

I have tried Percentile and PercentRank and some other stuff. No joy.

View 12 Replies View Related

Increase/decrease Values Individually?

Oct 13, 2008

I have a single simple question, so let's get straight to the point: I have an A column with these values:

I:::I::::::A::::::I::::::B:::::....
I==================== ....
I 1 I____40____I_________ ....
I 2 I____50____I_________.....
I 3 I____30____I_________.....

And I need each of these values increased/decreased by a constant number.

So far, I only found formulas where all cells are, say, added into a single result, as you can see here:.....

View 2 Replies View Related

Getting A Value To Increase Or Decrease Number Or Rows...

Aug 6, 2009

I need to be able to select a certain number (from, say, 1-20) from a drop down menu, which will decide a number of rows (filled with data) on the next sheet. As I prefer not to give anyone the sheet I'm actually working on I made a quick look-a-like which might explain this better.

A and B are different scenarios, with different values in the fake drop-down menu I made. Just to pass on the understanding of what I want the values to do. If putting a drop-down menu there is troublesome, then I can live without them. But entering a certain value in the field and getting that number of rows for a certain product is what I need. I tried searching for a function/macro to use for this, but I dont know what exactly to look for. Name, etc

View 4 Replies View Related

Percentage Increase Or Decrease From Cell

May 2, 2012

I need a formula that can work out a percentage increase or decrease from cell J2 to L2.

J2 is the current data with L2 being the previous data - so the formula would compare J2 with L2 and tell me if there is an increase or decrease shown as a percentage.

The figures fluctuate from month to month so they could be either an increase or decrease. There are over 300 entries so I can't go through each one adjusting the formula accordingly - this is why I need the formula to do the working out if it is up or down.

View 7 Replies View Related

How To Add + Or - Button To Increase / Decrease Value In Cell

Sep 21, 2013

I have a simple spreadsheet. A value is inserted in cell B4.

I want to increase that value or decrease it by adding a button in the next cells, C4 or D4, to increase and decrease that value instead of manually typing in the new value.

View 7 Replies View Related

How To Count Decrease To Increase Match

Nov 18, 2009

Below i have example table in which Cells B2:G4 have draw numbers. In Cells I2:X4 I have numbers in 3 groups, Group start with small number and finish with highest number.

For example in row 2 first groups is 5 to 36, second group is 10 to 30 and third group is 4 to 41 and continue same for rest rows ....

View 9 Replies View Related

Format Number To Increase/decrease

Jul 31, 2006

How can i format my excel spreadsheet cell so that a number

10,000,000

displays as

10

View 4 Replies View Related

Find Percentage Increase / Decrease Between 2 Numbers

Mar 4, 2014

I have totals in d18 and e18 and need to find the percentage increase or decrease between the 2. E18 is last year's value and D18 is this year's value. Which formula will give me what I am looking for:

(D18-E18)/D18 or (D18-E18)/E18

View 2 Replies View Related

Macro To Increase And Decrease Cell Number

Apr 28, 2012

I have a macro that increase a cell number and one that decreases a cell number, heres my code:

Code:
Sub Macro1()
Dim t
t = Split(Worksheets("Sheet1").Range("d5").Text, "/")
t(0) = Format(t(0) + 1, "0")
Worksheets("Sheet1").Range("d5") = Join(t, "/")

[Code] .......

So they do exactly what i want them to do but i want to put a limitation on them, so say the number in the cell is 0 then i dont want it to be able to subtract from it anymore, and say the number is 20 i dont want it to be able to add any more, i tried to put if statments into the code but no luck.

View 3 Replies View Related

Increase / Decrease Numbers Evenly For Spreadsheet

Aug 27, 2012

How to increase & decrease numbers evenly for a spreadsheet.

I have a number in cell F16 that can be changed and for this example say it has a value of 900.
I have a number in cell F17 that is always more than cell F16, for this example lets say it is 1000.

What I'm trying to do is create 10 numbers evenly increasing away from 900 (F16) in value, & 10 numbers evenly decreasing in value away from 900 (Cell F16) but here's the catch.

What makes this tricky is that the numbers that are increasing in value away from 900 (F16) can't be bigger than the value of F17 , IE in this example the number 1000

So the formulas must evenly distribute 10 numbers BETWEEN 900 & 1000. This must have the same even distribution for the increasing numbers & decreasing numbers.

I'll attach a sheet also. So, if you say 900 is a starting point & 1000 is the ending point, what formulas would you need in each cell to evenly increase to 1000?

Also,, going the other way, decreasing, away from 900 at the same rate as the increase?

Really stuck n this 1.
Spreadsheet here: [URL] ......
Screenshot here: [URL] ......

I'll attach a spreadsheet .xls

View 5 Replies View Related

Change Cell Color After Every Decrease Up To Increase

Nov 15, 2009

I have a 49 numbers in cell A1:AW1 they are not in acceding order. I want to separate all groups’ start from lowest number to highest giving them deferent color. As shown in example table below in cell (A2 start with nº 6 and increase up to nº 47 till cell F2 =yellow color) then Cell (G3 decrease nº 3 and increase up to nº 49 till cell L49=Green Color) and continue same process for rest ....

View 9 Replies View Related

Command Button Size Increase / Decrease

Jan 22, 2008

I'm building a keypad out of commandbutton controls, and there's this strange resizing behavior with the commandbuttons. I've attached an example, as it's much easier to see than describe.... but essentially, clicking a button seems to enlargen it slightly, and then two clicks later, it 'dezooms' back to original size (even with shadows turned off). while this is not hugely noticeable individually, it feels really strange when there's a whole keypad of commandbuttons.

View 8 Replies View Related

Keyboard Shortcut To Increase Or Decrease The Number Of Decimals

Apr 21, 2009

Is there any keyboard shortcut to increase or decrease the number of decimals shown directly (I mean without having to use ctrl + 1... etc )

View 7 Replies View Related

Spin Button To Increase Or Decrease By 1 Each Time It Is Clicked Up Or Down

May 18, 2009

I am having difficulty finding information on coding my spin button on a user form. I searched and haven't found any information. I need to do is code a spin button to increase or decrease by 1 each time it is clicked up or down. I would like it to populate to a text box on my form if that is possible.

View 3 Replies View Related

Formula To Change Cell Colour :: Due To Sum Increase Or Decrease

Sep 28, 2009

how to change the cell colour due to a sum increase or decrease? For example: if the amount is greater than 200, change cell colour to green. If under 200 change cell colour to yellow.

View 2 Replies View Related

Difference Between Dates And Times In Days , Hours Mins ( Working Hours )

Mar 2, 2010

The below formulae allows me to see the difference between two dates and only returns the difference in working hours ie :
Difference between
02/02/2010 08:00 & 03/02/2010 08:00 is 16 Hours 0 Minutes

=(INT(A3)-INT(C6))+MAX(MOD(A3,1)-MAX(MOD(C6,1)))

The following displays it in the Hrs and Mins format

=TEXT(B15,"[h]")&" Hour"&IF(OR(TEXT(B15,"[h]")+0=0,TEXT(B15,"[h]")+0>1),"s "," ")&MINUTE(B15)&" Minute"&IF(MINUTE(B15)1,"s ",""))

View 9 Replies View Related

Count Hours Between 2 Times Based On Hours In Another Cell

Jun 11, 2008

A1 is 10 (10 hrs worked) , A2 is 10:30am (in time), A3 is 9:00pm (out time), A4 needs to be the total hours and minutes between A2 and A3 based on the hours listed in A-1. What i need is a formula that will calculate the hours and minutes between the 2 times based on hours entered in A1 but that will also compensate for a manadatory 30 minute lunch that needs to be deducted from the total hours if hrs listed in A1 are more than 6.

example: worked 10HRS, 10:30am to 9:00pm, Total hrs is 10hrs 30min, which should be just 10 since the lunch is a none work time and must be subtracted.

If a person worked more than 6hrs, they must take a lunch. if they worked less, than 6 then they don't have to. I need a calcuation to recognize the greater than, less than factor into the equasion also.

View 9 Replies View Related

Calculate Hours Between Two Times Per Day And Add Them Up?

Jan 2, 2014

This is for employee time sheet and schedule. I have multiple employees work a specific shift on various days. I need the calculate the hours worked each day and then have them totaled at the end of the period. Here is and example:

Employee Monday Tuesday Wednesday Thursday Friday Saturday Sunday Total Hours Total Cost
John Smith 10-5 12-6 9-2 5-10:30 3-8:30

How do I get it to calculate the difference in the same cell, convert it to hours, add up all the results and place it in the totals columns then calculate those totals by their pay rate to get my Labor cost?

View 1 Replies View Related

Count Times Between Hours

Apr 27, 2007

I am working on a spreadsheet where I want to count the number of calls to our service desk between specific hours (ie. 6:00 a.m. - 7:00 a.m.) up through 8:00 p.m. I have looked at all the forums and tried all the formulas that seemed to be what I was looking for and it isn't working! I am adding the information to a summary spreadsheet from which I am gathering the information from other sheets in the workbook. This will be an ongoing spreadsheet done weekly for every month.

Examples: I need to know how many calls from these times on a summary sheet.

6:23
6:28
6:59
7:09
7:35
7:38
8:00
8:26
8:34
8:42
8:43
9:02
9:04
9:23
9:27
9:31
10:06
10:23
10:37
10:51
11:05
11:09
11:19

View 9 Replies View Related

Add X Hours To Dates And Times

Dec 31, 2007

I receive data from a company I deal with that has the date and time of all of my transactions with them listed in an excel worksheet. Only problem is that the date/time that I receive is not in my timezone, which is a bit of a problem for me!

What I want to do is to be able to adjust the date and time shown in the cell forward by 14 hours, so that the data is shown in the timezone that I am currently in. So the end result for the first line of data in the attached file would end up being 2006-08-11,10:28:51 instead of 2006-08-10,20:28:51.

View 5 Replies View Related

Counting Specific Hours Between Two Times

Apr 20, 2009

Basicly we pay single rate between 8.00am and 8.00pm at all other times and on bank holidays and weekdays we pay an enhanced rate. If I can calculate the standard hours then the remainder of the hours are enhanced. Aim to count how many work hours fall between a standard start time (SHS) and a standard end time (SHE) (currently 8.00am and 8.00pm), that do not fall on a weekend and are not a bank holiday.

Column B = Start time (eg 06:00)
Column C - End time (eg 22:00)

Column D= date (from which day of week is derived)
Column E = Y or N for whether it is a bank holiday or not..............

View 4 Replies View Related

Show Hours After Midnight From Two Times

Jan 10, 2014

I would like to get formula which can show how many hours are after midnight from two times, example:

PHP Code: 

clock in > clock out = hours after midnight
23:00 -> 1:00 = 1:00
01:15 -> 4:15 = 3:00 

Please see this example: [URL] ......

View 12 Replies View Related

Difference Between Two Dates/times In Hours

Apr 24, 2006

I need the difference between two dates/times field in hours or minutes.

Eg:

A1 B1
1/4/05 10:00 2/4/05 14:30

The result should be 13.5 hours, considering only 8 hrs per day, only business days and 8 to 5 workday.

View 10 Replies View Related

Days & Hours B/t Two Dates & Times

Oct 23, 2008

I can’t figure out why this formula is not working. I am trying to alter it a little, but I still think it should work. Here is what I am trying to do. I am looking to calculate the time difference between two work projects, but exclude time when the office is closed. So someone starts a project at 2pm and finish 10am the next day it will show a result of 4 hours because the office closes at 5.

Here is the formula. It is the time formula from cpearson.com ...

View 6 Replies View Related

How To Calculate Number Of Hours Between Two Times

Jun 22, 2012

Is there a way to calculate the number of hours between two times specified like this:

Start
End
Hours
Comments

Mon 6:00p
Mon 9:00p
3.00
Same day

[Code]..

I think I can write a UDF and that may be the easiest. Is there a straightforward way without a UDF?

View 6 Replies View Related

Calculate Times Greater Than 24 Hours

Aug 20, 2008

I have problem to calculate the time which is more than 23:00:00hrs in a file. I need to compare the benchmark time and the difference of time(start time and end time) and show pass/fail depending on benchmark set time. For few of the times which is more than 23:00:00 hrs the format is taking different(example: for 49:15:48, it is showing 02/01/1900 01:15:48 in formaula bar) for which i am not able to use formula and know pass/fail.

View 4 Replies View Related

Calculating Times: Minutes And Hours

Sep 25, 2006

i need to get a formula that will calucate hours and min. its for how many hours the employee has not worked. some of them would be strait hours some would be just min there is no way to tell.

example
lates 2 hours
anp(absent no pay) 12 hours
sicks 55.5 hours
no calls
early outs 21 min
(this is just an example if it were real this person would be fired)

i know this adds up to 69.85 hours but i can't fuiger out a way to get it to calucate in excel. i know i could have it all changed to min and then devied by 60 to get the hours but how do i get it to read what is mins and whats hours?

View 7 Replies View Related

Round Number Of Hours Between 2 Times

Feb 7, 2008

I'm trying to do a simple calculation of the # of hours between 2 times, rounded up to the nearest hours. Somehow along the way I've ended up with this massive formula below, which is doing what it's supposed to do except for certain cases (like the one in the attached file...where it says the difference between 2am and 3am is 2 hours) =ROUNDUP(IF(B2="",0,IF(A2="",0,(IF(B2<A2,((((B2+1)-A2)*1440)/60),(((B2-A2)*1440)/60))))),0)

View 4 Replies View Related







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