Account For “negative” Time
Dec 9, 2009
I’m trying to get the difference between times, BUT I want to account for “negative” time. So if I project that an employee will finish a task at 2 am, and they finished at 2:30 am, I want the result to be -:30, not just :30. If they finished at 1:30 then it would just be :30. Hence, my dilemma. I can get the difference, but didn't think Excel could recognize negative times. Right now I am using =MOD((A1-A2),1) or =(A1-A2+(A1<A2))*24/24 and in cells A1+A2 I am using military time.
View 2 Replies
ADVERTISEMENT
Apr 13, 2014
I have a sheet which contains credits and debits for several accounts:
Customer
Amount
ABC
2000
XYZ
3000
XYZ
1000
ABC
1000
ABC
-5000
XYZ
1000
What I need to do is match negative and positive values within each account and highlight them. I have been able to put together a VBA code from google and other forums to match within all rows.
Code:
Sub matchdata()
On Error Resume Next
For Each cl In Columns(10).SpecialCells(2, 1)
Err.Clear
[Code] ........
1. I need to adapt the code so as to do matching within accounts. Example within ABC and XYZ separately.There will be 100s of accounts.
2. If possible, I need to offset a credit (negative value) with multiple debits. Example: ABC -5000 would offset ABC 2000 and ABC 1000. I am not worried about the remaining balance.
View 1 Replies
View Related
Sep 7, 2012
Creating a formula that basically has a big IF statement. I hope this makes sense, so here goes. I am looking to find the "age" or "elapsed days" of an ID from when they created an account to when they stopped. This might be very complex and if there's not a way to calculate the Elapsed days (even though that's what I prefer), perhaps there is some formula that can return a value like a "1" or "True" or something that lets me know the statement is true.
original formula from post 3261273
{=IF(D2>0,A2-INDEX(A$2:D$16,MATCH(B2&"1",B$2:B$16&C$2:C$16,0),1),"")}
New formulas needed or revised from the above:
Formula 1: If the ID in column 2 are the same, and if there is a value in column 3 (Create) and a value in Column 4 (Suspend) AND there is no value in Column 5 (Stopped), then subtract the dates in column 1 for Create and Suspend. My manual calculation result is in the column called "Elapsed Days (Create to Suspend but NO Stopped)
Formula 2: If the ID in column 2 are the same, and if there is a value in column 3 (Create) and a value in Column 4 (Suspend) AND there is no value in Column 5 (Stopped) OR Column 6 (Unsuspend), then subtract the dates in column 1 for Create and Suspend. My manual calculation result is in the column called "Elapsed Days (Suspend Only, No stopped or Unsuspend)"
Formula 3: The ID in column 2 does not have to be the same, but if there is a value in column 3 only (Create) and there is no value in the Suspend, Stopped, or Unsuspend columns, then place a "1" in the cell. My manual calc is the "Create Only" column.
Event Date
ID
CREATE
Suspend
STOPPED
Unsuspend
Elapsed Days (Create to Suspend but NO Stopped)
Elapsed Days (Suspend Only, No stopped or Unsuspend)
[Code] .........
View 1 Replies
View Related
Aug 21, 2009
I have two sheets. First contains Department # 0002549, and the other one contains 5 more digits(#02001 0002549). I will need to find the exact match for the first sheet to contain all 12 digits. THey are all in different order, so I probably have to match them first then add whatever the first 5 digits number. How should I tackle this issue? I was thinking to use vlookup but how could you use vlook up if only last 7 digit matches and add addtional digits to exisiting number?
View 9 Replies
View Related
Jan 30, 2007
i am tracking my working hours at night, so i type in the time i start and the time i quit like this:
A 1 start B 1 end
A 2 22:30 B 2 02:30
now i want to calculate the time between.
but since excel don't like the negative time i got a problem. i figure i must make a function something like
=IF(B2<A1,B2+24)
i have tried a few but i don't get the parameters right so i get errors,
View 9 Replies
View Related
Mar 8, 2008
I have a formula calculating time to the second (e.g HH:MM:SS). I am calculating the difference from the time something was scheduled to be done vs. when it was actually completed. What I can't get Excel to do is calculate the same time but listing the time in negative, as if the project went over and by how much.
I know how to do this in numbers view, but unable to do this in time view.
View 9 Replies
View Related
Dec 22, 2009
I can't use 1904. I have a formula that almost works.
I am doing everything in Military time. This is the finial peice of the puzzle.
Our shift begins at 18:00 and ends up until 7:00 (am) or so depending onwork
A1 I have a time (Projected-Estimate of when all work should be done)
A2 I have a time (Actual- Time the work was actually complete.)
A3 Will be show the difference in either a Negative or Positive time.
Three Examples: (The first two work as is and are perfect) ....
View 6 Replies
View Related
Nov 14, 2008
how to do that? In "mm:ss" format if possible
View 2 Replies
View Related
Feb 6, 2012
Data from a SQL database represents time of day as a string of x's when imported into Excel. With CLEAN, I found that noon is -0.5.
This means that the calculation being used for noon is (24 * -0.5), or -12, meaning "go to the end of the 24 hour day, then go back half a day to noon." Similar calculations work other times of day.
Time entries that start in one day and end in the next are not allowed, so there is no problem with a change in day,
How can I convert this to the AM/PM time that my users need?
View 2 Replies
View Related
Jun 11, 2009
My worksheet takes a time feed in the format '00:01:05' and I want to trigger an event when it goes to negative (eg, -00:01:05). But I have no idea how to handle it.
View 9 Replies
View Related
Jul 18, 2006
Ecel 2000
If Ii subtract time
eg 22:00-01:00 I get ############### wrong
If I subtract 22:00 23:00 I get 1 HR correct
View 3 Replies
View Related
Apr 24, 2009
Excel 2000. I am having a little problem getting the list of numbers detailed below to turn red if Negative and Green if positive, (0:00 to stay blank). These numbers will changed between a maximum of 120:00hrs and -120:00hrs....
View 2 Replies
View Related
Dec 22, 2009
(First please don't send me a link on how to subtract time or show Negative time. I know about 1904 ect.. I can't use that. I need a variation on the formula I am using if possible)
A1 I have a time
A2 I have a time
A3 I have a formula subtracting A2 from A1
The times will vary in A1 & A2. Sometimes A1 will be earlier or later thus giving me negative or positive times. I have a formula that will give me a correct answer but will always show either Positive or Neg depending on what I put in the last part of the formula "-H:MM or H::MM" =TEXT(MAX($A$1:$A$2)-MIN($A$1:$A$2),"-H::MM") in A3. I want it to do the subtraction but say if A1 is > than A2 then "-H::mm", If A1 is < A2 then "h::mm". I don't know if that is possibly or how to incorporate that into what I have.
View 3 Replies
View Related
Jul 16, 2007
It seems that time (i.e. -1:00) will be default as #########, etc. This makes me very unhappy. How to get around?
I could be fine with converting time to a total in seconds (i.e. 1:00 converted to 60 seconds)... but I'm not sure what kind of formula could do that.
View 9 Replies
View Related
Apr 29, 2008
I have one service level sheet where i used data in time format. I am getting error while using this sheet. I will just explain it in simple way...............
Please find below mentioned details.
Cell C D F
1 23:04 23:13 00:03
In cell G1 i have formula to get time difference between cell C1 and D1 and its give me difference between these both time as 00:09.
Formula is =IF(OR(ISBLANK(C1),ISBLANK(D1)),"",D1-C1)
In cell H1 i have formula to get difference time between cell C1 and F1.
Formula is =IF(OR(ISBLANK(C1),ISBLANK(F1)),"",F1-C1)
But in Cell H1 i am getting Error as Negative time or date display as ########
Is there anyway where i can get Exact time diffrence between Cell F1 and Cell C1
View 20 Replies
View Related
Aug 9, 2009
the Times work fine 22:00pm to 5:30am or 6:00am to 5:30am
Formulas
J4
=IF(ISNUMBER(D4),(D4>E4)*MEDIAN(0,E4-N$4,O$4-N$4)+MAX(0,MIN(O$4,E4+(D4>E4))-MAX(N$4,D4))-F4-L4,0)
K4
=IF(ISNUMBER(D4),MAX(0,MOD(E4-D4,1)-J4-L4-M4-I4-F4),0)
L4
=IF(ISNUMBER(D4),IF(MOD(E4-D4,1)-F4>P$4,(MOD(D4+P$4,1)>E4)*MEDIAN(0,E4-N$4,O$4-N$4)+MAX(0,MIN(O$4,E4+(MOD(D4+P$4,1)>E4))-MAX(N$4,MOD(D4+P$4,1))),0),0)
M4
=IF(ISNUMBER(D4),MAX(MOD(E4-D4,1)-F4-I4-L4-P$4,0),0)
but if I try 22:00pm to 6:00am or later
The following is displayed
Negative Time in J4 and the wrong result in K4
this is not what I need
It should be showing the following
J4 2:00 K4 5:00 L4 00:00 M4 00:00
View 9 Replies
View Related
Nov 4, 2012
I have devised a simple formula when a member of staff enters a date and time into a cell it starts deducting from todays date and time. ie:
Cell A1 - Date and time is entered by staff
Cell B1 - Is the above cell +24hrs
Cell C1 - NOW()
Cell D1 - B1-C1 Formatted in hours ( [h] :mm:ss (Like a count down clock)
The problem i have is that i cannot get Cell D1 to show minus ours it just goes to negative and shows continous #####. Is there any way i can get Cell D1 to show the hours it has gone minus by.
View 6 Replies
View Related
Mar 16, 2013
I have a problem with adding time values. The idea of my spreadsheet is to count time worked, and then calculate any variance from the normal shift length (i.e. 7h 30m). My formulas work fine until I work less than 7h 30m in a shift.
Example:
A1=start time
A2=end time
A3=IF(A2="","",MOD(A2-A1,1))
A4=IF(A3="","",(A3-(TIME(7,30,0))))
When the duration is over 7h 30m, A4 correctly returns the value of extra minutes. But when the duration is under 7h 30m the return is #####.
PS A1:A2 are formatted in a custom format hh:mm and A3:A4 are formatted as h:mm, and I'm using Win7 & MS Office 2010.
View 5 Replies
View Related
Apr 24, 2013
EXCEL 2010. I have a column of negative and positive times (eg. -00:52, -03:07, 06:02) in custom hh:mm format, and would like a new column rounding these times to the nearest negative or positive hour (with just the whole hours displayed), so I need a formula that would give me (for this example) -1, -3, 6, etc.
View 9 Replies
View Related
May 12, 2009
I have a large dataset (24000 rows) that requires me to multiply two different columns of integers. In some cases, the two integers are both negative and multiplying them results in a product that is positive. I actually need that product to be negative rather than positive. I can't quite seem to figure out the best way to accomplish this.
View 5 Replies
View Related
Aug 1, 2007
I have data that comes from a subsytem that places the negative sign at the right of the number, so it is recognized as text. I can get around this using find and replace and then a second step to multiply that by -1, but is there a formula that can do this for me?
I was trying if(right(A1,1)="-",TBD,A1)
View 4 Replies
View Related
Sep 1, 2007
I have data starting in E7. I want it to go down the column and find the negative numbers. If it finds one then I want it to change the number in the row to the left of it to a negative. So if E67 is a negative number, make D67 a negative and so forth down the line Sounds "simple" but how do I do it?
View 7 Replies
View Related
Jan 19, 2009
I have data in range J2:J365 , H368:H401 & J403:J827. i want to check wether this range have negative values or not if yes load all negative values in the listbox1 by clicking checkbox.
View 3 Replies
View Related
May 21, 2006
to write a macro to put the background color where a certain figure sum is zero. Eg. Column A contain as
5
-5.25
12
-5
-12
If one select A1 to A5 and run the macro the color for all cell should be green except for A2. Infact the macro will point out which amount is not deposited into the bank. (All +tives are for Deposits and all –tives are for sales)
View 9 Replies
View Related
Aug 15, 2013
Attached is my sample data...Indicative Data_Revenue 2.xlsx
My aim is to populate columns C to G (Q1,Q2,Q3,Q4) automatically via vba against a particular account name(in expected output tab).The account names will have a Key word (listed in the "List Of Account" tab)The Q1 Sum should be a sum of Q1 revenue against all such accounts containing the Key word. Same applies for Q2,Q3 and Q4.Each account has 3 types. viz, BAU, Top Commits and Strong Prospect.
The BAU quarter sum should be pulled from "Revenue 1 - Assured" tab where Q1=Apr+May+Jun, Q2 = Jul+Aug Sep and so on. The Top Commits Sum should be pulled from "Revenue 2 - Expected" against all records where "Sales Stage" Column equals Stage 4. The Strong Prospect Sum should be pulled from "Revenue 2 - Expected" against all records where "Sales Stage" Column equals Stage
Currently I am using formulas but there is too much of hard-coding and its becoming difficult to manage as Accounts increase.
View 9 Replies
View Related
May 11, 2009
I need to have a running counter of transactions within an account.
Solved with: C2=COUNTIF($B$4:B4,B4)
(and copy down)
Example:
ACCTNO AMT Trans#
100125.001
100121.002
100122.50 3
1001 2.00 4
1001 5.00 5
100127.00 6
1013 .50 1
1013 2.50 2
1013 13.00 3
I need to solve for the Trans# I've included it here for clarity, but I need to be able to get that number based on the ACCTNO. Notice the Counter Resets to 1 when the ACCTNO changes from 1001 to 1013.
View 6 Replies
View Related
Feb 26, 2009
I need to produce a grid displaying data pulled from local references within the workbook but Excel will not auto fill the references in the right way.
i need
='Account (1)'!$C$5
='Account (2)'!$C$5
='Account (3)'!$C$5
down to
='Account (498)'!$C$5
='Account (499)'!$C$5
='Account (500)'!$C$5
is there a way to imput these references using VBA script?
View 10 Replies
View Related
May 31, 2007
If you Have a list of account numbers and amounts, is there a way in one forumla to get the average per account?
View 9 Replies
View Related
Aug 19, 2007
The expense account we work with involves several currencies due to the international nature of the business. With that, each row must show the currency involved and the formula used from one line to the next makes it repeat the currency until changed i.e. if cell B22 has a date entered then Cell H22 will reflect the currency from Cell H21 =IF(B22="","",H21). If Cell H21 showed CDA for Canadian currency then H22 would also become CDA. Once changed manually then all cells below will now reflect the new currency until changed again.
Using the lookup function we collect the individual amounts of each currency and run totals at the bottom. Therefore, if there were three entries in SGD (Singapore Dollars) and two entries in EUR (European Euros) etc. that each row will do a lookup by the three letter currency code and collect the sum of each currency. SGD could repeat later again and when changed manually will be included in the lookup.
At the present we are entering the three digit codes manually i.e. SGD. What we would like to do is automatically have the bottom be able to pickup the currency change when a new currency is entered on the individual rows on the top part of the expense sheet. So if Cells H21:H23 were SGD and Cells H24:H25 were ERU that Cell A58 would show SGD and cell A59 would somehow be able to grab the ERU etc. One of the same currencies may repeat itself and the lookup will capture the additional totals but SGD would only show once.
View 9 Replies
View Related
Nov 23, 2007
I am working with percentages, and trying to avoid #DIV/0! Errors at the same time.
Lets assume column A holds last years figures, and column B holds this years figures, column C calculates the difference in percentages.
I am having dificulty where say A1 = 0 B1 = 10 (C1 Should be 100%)
then what happens if A2 = 5 and B2 = 0 (C2 Should be - 100%)
Is there a common formula that will account for all possible + or - figures in A and/or B that will also suppress #DIV/0! Errors?
View 9 Replies
View Related