# Calculate Difference Based On Criteria

May 5, 2013
I have a number which consist of 12 digits such as 765432123345. The first two digits denotes the year. I need to create a formula in the next column to calculate the difference in years by comparing to the current year of 2013. In this scenario, the difference will be 37. Is there a way to do this?

View 5 Replies
ADVERTISEMENT
Feb 8, 2010

I have a Point A to Point B with the distance.

1. user can set a adjustable distance in cell J1. e.g 2000

2. User select Point A.

3. User select Point B

4. Then list out all the Point C where distance diff between Point A and Point B all within 2000.

View 14 Replies
View Related
Jul 30, 2012

I am conducting some analysis on alarm data of certain devices and am looking for creating a VBA algorithm that will do the following (refer to the table below for example data)

I want identify an asset in alarm (Column F) and based on its asset ID (Column C) and Fault Description (Column D) then find the row when the asset with the same asset ID and fault description returns to an 'ok' Asset State. After the row where the same asset ID and Fault description is found where the asset state returns to 'ok', I want to calculate the total alarm time based on the difference between when the asset ID and Fault description goes from 'Alarm' State to 'OK' state from DateandTime Column.

I want the result to be populated in a new worksheet that displays data with the following column headings as a result of the above calculations: Date, Asset ID, Asset Description, Fault Description, Alarm Time

I have added an additional column to show the type of output I am after.

There are up to 20,000 rows of data I want to perform the above calculation on.

A

B

C

D

[Code]....

View 2 Replies
View Related
Jan 17, 2009

We typically give out Free Rents (usually a few months) to our tenants, which is always up on the front. And then we would charge a rent increase ($.50 per year in the example) starting 12 month after the rent free rent ends and every year (12 months) afterwards. The rent will be flat between each increase. My questions have two parts:

1. Is this something array formula can handle in one formula?

2. Since I am not an expert on array formula, what I ended up doing was to create a line for "Rent Bump Date" which is defined as the Free Rent + 13 for the 1st rent increase (meaning if you dont get free rent you would start paying increase in month 13 and every 12 months after. And I put in what the rent would be for each rent bump date. My solution is if the rent for each month (1 - 240) would be determined based on the ranges of those bumps. For example,

Month 1-15 Rent $20

16-27 20.50

28-39 21

40-51 21.5

52-63 22

64-75 23

......

......

......

232-243 30......................

View 5 Replies
View Related
Jun 8, 2006

I am working on my companies tax reports for the first time. The wages for unemployement and FUTA do not calculate IF the total wages are over a certain amount.

Im trying to get the formula to see if the total wages are over $7000 then dont calculate. Ive tried several different things from the links, but still can't make it work.

total wages are $7800, so i only need to calculate it on $7000 and then not calculate it again for the next quarter.

View 3 Replies
View Related
Jul 29, 2006

I have events in column 1,in my sheet there are about 800 events.

In col 2. each contestant has a label,blue(b),green(g) or red(r)

In column 3 I want to print the % of blue + green of the total for each event,

e.g first event in attached sheet would show 77.7% down to row 10 in col 3 etc.

View 9 Replies
View Related
Apr 20, 2007

I have a spreadsheet that has staff id in one column and the work items number that they have done in a daily basis in another column.

The actual list is very long. I need to summarize in another column how many work items that they have completed in a daily basis.

I have attached a sample spreadsheet as an example. I would need to summarize in column H based on the staff ID. Some work items are shared by two staff but it will have to be counted as one work item completed for each staff. If work item B123466 is completed both by staff M56 and M54, then it will be counted as one for each.Currently, I am doing this manually with the filter function which is very tedious and often has mistakes. I would like to formularize this task.

View 6 Replies
View Related
May 20, 2007

I want to calculate the sales rank of the customer whose CUSTOMERID is equal to my ID? Note that sales rank is what position the salesperson is in terms of DOLLAR VALUE OF SALES.

Just a bit stuck on this. How do I calculate the rank? Is it a If statement or a Vlookup Question?

The spreadsheet can be found here: http://www.megaupload.com/?d=5D0YCHIG (It's too big to be uploaded to the forum hosting).

View 9 Replies
View Related
Dec 22, 2007

Need a way of getting one of 4 values in sheet 2 to perform a calculation with. The aim is to show the total volume of a given item. Because there are four data sources for the actual volume (with varying degrees of accuracy) I've incorporated all of them in one sheet but want to use the values in precedence i.e. the first figure is where I've had someone physically tell me how many fit to a pallet (cubic metre) and know that to be accurate. If the value there is 0 I want to use the next figure as certain other items were measured physically. Column three and four are from some legacy systems and therefore should only be considered if the figures are 0 in the first two columns. Rather than ramble on any more I've attached a sample sheet

View 4 Replies
View Related
Jul 26, 2013

I am trying to create a sheet which will automatically calculate data based on laid down criteria.The criteria are as follows:

Cab Type in cell () Indica

If the value of cell () is less than or equal to 40Km then cell (B3) will be 400.

For every extra km above 40 the cell value in cell (B2) will be extra km done multiplied by 8 in cell (D2)

If the value of cell () is greater than 40 but less than or equal to 80 then cell (B3) will be 800

For every extra km above 80 the cell value in cell () will be extra km done multiplied by 12 in cell (D2)

Cab Type in cell () Indego

If the value of cell () is less than or equal to 40Km then cell (B3) will be 600.

For every extra km above 40 the cell value in cell (B2) will be extra km done multiplied by 14 in cell (D2)

If the value of cell () is greater than 40 but less than or equal to 80 then cell (B2) will be 1200

For every extra km above 80 the cell value in cell (B2) will be extra km done multiplied by 16 in cell (D2)

Ther are about 5 different types of cabs in the sheet.

Cab Type Provided

Total KM run

Basic Amount

Extra km

What I want to achieve is as under:

1. If value of cell A1 = Indica and value of cell B2 is entered as 40

Then the values of cells (C2:e2) should populate automatically as 400, 0, 400

2. If value of cell A3 = Indica and value of cell B3 is entered as 40

Then the values of cells (C3:e3) should populate automatically as 400, 40, 440

View 8 Replies
View Related
Aug 30, 2006

I only want the formula to operate when there are values to calculate and then ONLY refer back to the last calculation. If there are gaps between the calculations I would like those to remain blank. Is that possible?

I have attached an example of what I am trying to do.

View 3 Replies
View Related
Sep 27, 2012

I have long series of data in 8 columns (B, F, J, N, R, V, Z, AD) starting at row 5 down to row 86404. I want to find the total median for each row, where a condition is met for that row. The condition is if number>10 and the number is located in row 3 for each column (i.e., B3 for column B). So, if B3, J3, R3 are all >10, then I want to find the median for all the numbers in the columns B,J,R.

I assume there is an array formula that could do this? I've tried a few solutions with no luck.

View 4 Replies
View Related
Jun 15, 2014

I'm trying to design a Profit and Loss template that calculates off an accounting software data dump. I will attempt to explain the problem here but I have included a summary in the linked workbook which would be easier.

DOWNLOAD WORKBOOK: [URL]

I have two problems:

The Formula: Basically, I need to calculate every cell in the Profit and Loss statement based on the below criteria: The Profit and Loss item accounts, e.g. Gross Income has 6 accounts. There is a reference table for these - so incorporate index match/vlookup? User selected data from 4 combo boxes.

I am thinking a SUMIFS formula (using the combo box values) and somehow combining a vlookup to pull the items accounts. I'm starting to think that VBA is the best method?

Tweaking: The attached workbook is a small example. The full data dump contains 60,000 rows.

View 1 Replies
View Related
Jan 8, 2010

I'm trying to calculate a multi-variable equation based off of data in a table with different criteria. If you reference the attached spreadsheet I am trying to calculate cost based on weight and zone. For the data entered in cells B1 and B2 944.01 would be the cost. If you look at the table in G2:N3 you'll notice that the values in G2 and G3 are the weight limits G2 is from 0-4999 and G3 is 5000+, this should impact where the value in B1 falls. B2 should select from H1 to N1.

View 3 Replies
View Related
Jul 24, 2014

I'm trying to automate the attached schedule so that the formulas in H stop increasing once the amount in column J equals zero. So far everything I've tried either gives me a circular reference error or ends up giving me the same result as if I depreciated the asset an additional month.

View 3 Replies
View Related
Apr 20, 2009

I request a help:

A1 = 01-Apr-2009

B1 = 02-Apr-2009

C1 = 03-Apr-2009

D1 = Blank

E1 = 05-Apr-2009

F1 = 06-Apr-2009

What is the best suitable formula to find "First blank cell", then "date difference" between today and its previous cell's (i.e today minus "C1" in this case).

View 12 Replies
View Related
Jul 27, 2009

I need to calculate the amount of time between two dates, and show it in the number of hours and minutes. My dates are formatted to show the time in Zulu time. So 1406 = 2:06PM.

Here is what I have:

A1 = 6/4/08 1406Z

B1 = 6/5/08 0402Z

For this example, the formula should return a result of 13 hours and 58 minutes. With the result, there is no need to desingate Zulu time with a 'Z'. But I need the result in a format that will allow me to calculate an average for all my data.

View 9 Replies
View Related
May 9, 2009

I'm looking for a macro or formula that can calculate the difference to the lowest of col C based on option in colB. See attached. I complete what it should look like in F. Basically, this can be done by sorting the data by colB and using this formual for every group. =C2-MIN($C$2:$C$4). This is not ideal because I have many of these to do and you have to adjust the min range for every group. Plus group sizes will vary.

There has to be a better way. Ideally, I would not like to have to sort the data, unless a macro did it for me....

View 9 Replies
View Related
Mar 28, 2012

I have 2 columsn with data that looks like this:

Creation DateResolved DateDifference in days7/1/2011 4:221/9/2012 14:587/1/2011 8:567/1/2011 13:517/1/2011 11:438/3/2011 17:157/1/2011 11:597/14/2011 14:077/3/2011 22:477/5/2011 11:037/4/2011 1:399/15/2011 15:207/4/2011 8:367/5/2011 9:357/5/2011 7:047/6/2011 9:107/5/2011 9:177/6/2011 10:007/5/2011 10:471/9/2012 14:37

I am trying to figure out what formula to use to calculate the difference between the creation date and resolved date in hours and days. That is, In once column I would like to see the difference in 'hours' and in another column I would like to see the difference in 'days'.

View 3 Replies
View Related
Sep 11, 2008

This is more of a query on date dif

I was trying to calculate the difference between two dates on excel

I had a look through the search message board and searched the web generally where I came across the datedif function

I had found that in order to get the number of years it was

=datedif(startdate,enddate,"Y")

for months same formula"YM" and for days use "MD" in place of "Y" in the original formula

My question is when using datedif to calculate the number of days between two days it initialy gave me the right answer

Number of days between 01/08/2008 - 22/08/2008 - Answer 21 days

Using date dif gave me 21 days but when i did

01/08/2008 - 01/09/2008 - this gave me 0

Am I entering the formula wrong or does datedif simply not pick the difference if the days havent changed even though the month has ?

I then found i could simply minus one from the other , which then had me asking what is the point of date dif

View 9 Replies
View Related
Jul 31, 2008

is anyone aware of a formula/macro that can calculate (in days, hours and minutes) how much time has elapsed between two date and time stamps?

For example [30/07/2008 00:30] and [01/08/2008 01:45], so in days hours and minutes it would look somewhat like this: 02:01:15

View 7 Replies
View Related
Apr 4, 2014

Example.xlsx

how to calculate the difference in value of an item between two dates on a pivot table. I have one table that feeds the Pivot Table and it has three fields:

Data as of Date

Item

Value

So each day, the Data as of Date is updated to the current day and the items are the same but the values are different. I need to calculate the difference in value between the most recent date and x days ago. I cannot figure out how to do this via Pivot Table.

View 5 Replies
View Related
Mar 4, 2014

I'm just trying to calculate the difference between dates in two columns and applying conditional formatting based on if it is a positive or negative number. But when there is a null value in either of the date columns I don't want anything returned.

So far I'm either getting a 0 or a FALSE.

Column A = Date 1 Column B = Date 2 Column C = Formula

=IF(NOT(ISBLANK(B2)), B2-A2, )

View 2 Replies
View Related
May 4, 2009

I am trying to determine the average reduction amount of appraised property values. I have two columns in my spreadsheet. Column H has appraised value of property. Column I has the accepted value of the property. Sometimes the accepted value is the same as the appraised value, sometimes it is reduced, and sometimes it is rejected.

I want to be able to find the average reduction amount when the accepted value is less than the appraised value and is not rejected.

Column H always shows a numerical value (i.e. $250,000), but Column I may have a numerical value or show "rejected".

View 9 Replies
View Related
Nov 13, 2009

I am currently usins Excel 2007 and would like to calculate the diferrence in hours and minutes (ideally in decimal e.g 4:30 should be reflected as 4.5) between two date and time groups, excluding the non-working time between 17:00 and 09:00, weekends and holidays. An 8 hour working day is to be used. I have attached a spreadsheet were I tried to achieved the above with little success.

View 2 Replies
View Related
Jan 25, 2012

From the below example, I would need to know the difference between date & time of Received and Resolved in number of days. Meaning - time difference should also be calculated in days

CELL ACELL BCELL CCELL DCELL E - REQUIRED OUTPUTReceived

DateReceived

TimeResolved

DateResolved

TimeTurn Around Time - IN DAYS20-Jan-122:43:00 PM23-Jan-124:50:00 PMDifference between Resolved date & time and Received date & time

View 7 Replies
View Related
Jun 13, 2013

I have a huge two column spreadsheet. The first column is a list of times in the format: dd-mm-yy hh:mm:ss and the second column is a status of either START or STOP

Every time there is a START, I want it to count the difference between that time, and the next STOP time, and display the results in column C

Sometimes there will be multiple START's in a row or multiple STOP's in a row, but I am only interested when the status actually changes from the first START to the first STOP. It then resets until there is another START.

Here's an example of how I'd want it to function:

13-06-13 01:22:13 START

13-06-13 01:22:16 START

13-06-13 01:22:20 STOP 00:00:07

13-06-13 02:20.01 STOP

13-06-13 02:21.03 START

13-06-13 03:22.04 STOP 01:01:01

I can do this manually, but of course there is too much data to do that, so I'm looking for an automated solution that looks at the status.

View 1 Replies
View Related
Feb 18, 2009

I want to calculate time difference from two columns,

00:00:18:4400:00:28:44

00:00:19:2400:00:29:24

00:00:34:7700:00:44:77

00:01:05:3200:01:15:32

00:01:05:3200:01:15:32

wanting the difference between col B and col a.

Sum doesn't work

View 9 Replies
View Related
Aug 21, 2006

I have two Rows of data. Each row contains a unique Name column and separate columns for Date, Hour and Minute. I would like to calculate the Time difference in Days, Hours and Minutes between the two Dates. I’m not sure if the way I’ve set it up is the most practical. I’ll attach the spreadsheet to better explain.

View 4 Replies
View Related
Jan 10, 2007

I am working on an employee weekly schedule and would like to be able to calculate the amount of hours an employee is scheduled each day. For example; if you worked from 7am to 4pm, I want to have a formula that can determine that (7am to 4pm= 9 hours) then sum the total amount of hours for all employees scheduled that day.

Mon Tue Wed Thrs Fri Sat Sun Total

Employee 1 7-4 7-4 8-5 off 2-10 5-10 off 40

Employee 2 8-5 11-8 off 7-4 1-8 off 8-5 43

Hours 18 18 9 9 15 5 9 83

View 2 Replies
View Related