Sum Column With Conditions

Feb 15, 2014

I have a table(see attached). I want to sum the total hours worked in Col C. Col B has the number of people on the job (either 1 or 2). I need a condition, I guess , so that if Col b has a number 2 in it, then the adjacent cell needs to be multiplied by 2, then summed into the total hours worked.

I am not sure on how i would write a formula for this. Looking at the sample if I add the total hours from col C at the moment I get a total of 18 Hours but as cell C3 & C5 have a "2" in their adjacent column, the total hours answer should be 27 hours.

View 3 Replies


ADVERTISEMENT

Count Data In Column X Based On Conditions In Column Y

May 6, 2009

I am wanting to count the number of records (excluding cells with no value) based on criteria in a corrosponding column. In column "AS" I have a number of records that are not sorted showing values "7", "13" and "2".

In column "AL" there are values attached to some of these records based on certain IF statement conditions. I am wanting to count and sum the number of records in column "AL" that meet the conditions of "7" in column "AS" and so forth.

View 3 Replies View Related

Sum Cells In Column Based On Conditions In Other Column

Dec 6, 2013

I am trying to sum up cells from a column based on conditions in another column (see attached file). I know this could be done using a formula but for various reasons I want to use code. I am not sure if what I am doing is the right approach.

View 1 Replies View Related

Sumproduct Where Two Conditions In The Same Column

Jan 16, 2009

I am trying to get sumproduct to work on a table where two conditions in the same column must be true (ie two employees must both have worked on the same project) in order to calculate a result. Trouble is my formula doesn't produce anything but a big fat zero.

Column A contains the list of projects. Column B has the list of employees. And column C has each employee's cost. So:

=sumproduct((column A = project1) * (column B = Joe) * (column B = Mark) * (column C))

=total cost of Project1 when both Joe AND Mark work on it.

Unfortunately, when I structure sumproduct this way, it returns zero.

View 9 Replies View Related

Search Column With Multiple Conditions?

Feb 18, 2014

I want to display the cell content after it has verified two things: 1. It pertains to the running month 2. It has maximum serial number The file enclosed is self explanatory. The formula would be dragged as every day data is likely to be added. I have written a formula, but I get error.

View 4 Replies View Related

Trying To Use SUMIFS To Sum A Column Based On Two Conditions

Jan 11, 2010

I would like to use a SUMIFS statement to sum up a column of numbers based on two conditions. The first condition is a word. I have this done. The second condition is going to be a two week date range, which I am having problems solving.

Here is my formula that works so far.
=SUMIF(Data!C:C,"Office",Data!D:D)

Now I would like to SUMIF a second condition is met. The second condition is a date and time in this format.
1/9/2010 9:21:49 AM

I am only concerned about the date. Time does not matter. I cannot figure out how to specify a date range for the second condition. I am trying to specify between 1/1/2010 and 1/14/2010 as a test. So here is what I have so far with a SUMIFS.

=SUMIFS(Data!D:D,Data!C:C,"Office",Data!A:A,"Cannot figure out how to specify dates")

Maybe my logic is wrong...maybe I need to do three conditions? Where column A has a date < 1/14/2010 and a condition that specifies a date > 1/1/2010.

View 14 Replies View Related

Mark Cells Where 2 Column Conditions Are Met

Sep 4, 2007

I have a macro that's supposed to update the value in column 1 when two conditions are met. Unfortunately it doesn't update the column at all:

Sheets("All_Records").Select

Dim item, rownum, maxrownum As Integer

Application. ScreenUpdating = False
maxrownum = Range("A2000").End(xlUp).Row

For rownum = 2 To maxrownum

If (Cells(rownum, 1).Value = "=") & (Cells(rownum, 29).Value = "OPEN") Then
With Cells(rownum, 1)
.Value = "APPROVED TRIAL"
End With
End If

Next rownum

End Sub

I took the code from another spreadsheet I have where it works fine. But there only one condition has to be met before the field is updated.

View 4 Replies View Related

Vba To Delete Rows Based On Certain Conditions In Column A

Mar 2, 2006

I have a report in which I need to delete the entire row for each cell in Column A that has the name "Defacto" in a certain location in that cell. I am trying to use VBA code in conjuction with the "MID" function [i.e., Mid(Cell.Value, 8, 7) = "Defacto"]. This is the code I came up with (but, obviously, it doesn't work):

Sub DeleteRowOnCondition()
Range("A2").Select
Range(ActiveCell, ActiveCell.End(xlDown)).Select
For Each Cell In Selection
If Mid(Cell.Value, 8 , 7) = "Defacto" Then Rows.Delete
Next Cell
End Sub

As well, there is another worksheet in the same report in which I need to delete all the rows that do NOT meet that condition (while retaining the ones that do).

View 9 Replies View Related

Transfer & Update Data From Column With Conditions

Jul 25, 2007

I have a lot of data broken up into numeric decimal form in one column. I need all this data to be transferred to different worksheets based on the amount of decimals. Attached is some of the data I need sorted. The first sheet is my main sheet, then the next sheets need to be ascending in numeric order by sorting the data with two decimals under the column Tear number system.

For example I need the next tab to be the data with 0.21 with 2 decimal places, then the next tab would be the data under 0.28 with 2 decimal places, then the data under 0.29 with 2 decimal places. So the 0.21 worksheet would be 0.21 and have all the data for 0.21.1, 0.21.2 all the way through 0.21.6.

I also need this to be compatible with new inserts to the main table. Meaning if a new number is entered in, the number and data would automatically be entered and sorted to the tab that the number pertains to. I have tried a vlookup function but have not had much success. I have also tried recording a macro but am having problems with that as well.

View 9 Replies View Related

Count Unique Entries In One Column That Meet Conditions

Jan 17, 2010

I tried to ask this question yesterday -- but it was a follow-up question stuck at the bottom of a thread. So, with your indulgence, here is a simpler version of the question, complete with an attached spreadsheet, if you wish to use it. I also closed the other thread by marking it "Solved", since it answered my initial question.]

The situation:

I have two columns of data. The data is not in alphabetical order, and every column includes duplicate values.

namegender
jones m
martinf
smithf
collinsf
wilsonm
jones m
martinf
hughesm
wilsonm
martinm
smithf
west f
jones m
west f
martinm


The challenge:

In one cell, count the number of unique names that appear in the name column 3 or more times... with the additional condition that each unique name (which appears at least 3 times) must include at least one one woman!

The correct result: ...

View 6 Replies View Related

Calculating The Average Of A Column Based On Multiple Conditions

Feb 21, 2008

How do I calculate the average based on multiple conditions? Is my syntax incorrect?

Here's what i'm looking for:

=average((IF(X1:X1000=A1)*(Y1:Y1000=B1),AA1:AA1000))

View 9 Replies View Related

Move Rows, Meeting Conditions In Column, To Another Workbook

Sep 17, 2009

I'm working with transcribed comments from patient satisfaction surveys. The goal is to produce a single Excel file that contains all of the positive comments from source files where physicians are mentioned by name. Our vendor notes this by preceding any person's name with an asterisk (e.g., *Dr. Smith or *Doctor Smith"). I've attached a sample source file (Ambulatory.xls), so you can see what I'm starting with (I've deleted the identifying data in columns B, C, and D).

I'm looking for the appropriate VBA code to cut and paste the row in one file (in this case, Ambulatory.xls) to a separate Excel file (Weekly Physician Comment Report.xls) IF the cell contents in column G of that row contain either of the following text pieces:

*Dr

*Doctor

Each week's file will obviously have an unknown number of total rows - and will contain lots of positive comments that DON'T mention a physician by name. In the file I've attached here, for example, there is only one such comment (highlighted in yellow). I simply want to cut and paste the rows with physician names into the new file. If you can provide me with the code to do this for this example file, I can repeat the process for my other files (there are 6 source files in all).

View 6 Replies View Related

Test X Conditions In Conditional Formatting: Highlight Cells Is Two Conditions Are Met

Oct 17, 2007

I would like to highlight cells is two conditions are met:Cell = 0Offset(0,-1)>0I tried the conditional format wizard and entered a formula: =IF(AND($J2=0,$I2>0)) But I keep receiving formual errors, which I understand, because it appears to be incomplete formula. But I am not sure what else I need to add to the formula in the conditional format wizard

View 2 Replies View Related

Sum With Two Conditions

Aug 14, 2006

I want to calculate the sum of column with two conditions on different
worksheets,

Example
Data
Stock #QTYMonth
01335208Aug-06
01337402Aug-06
01337392Aug-06
01335400Sep-06
01337100Sep-06
01337102Sep-06

If the stock # is equal to the stock # and Month equal to month
I need to get the result in another sheet as below.
Stock #Aug-06Sep-06
01335208400
01337794202

View 13 Replies View Related

Sum Under Two Conditions

Mar 13, 2008

what would be the most effective and easiest formula to use if I want to sum a range of numbers meeting 2 conditions (or more).. eg.. sum all the unpaid invoices (condition 1) due on March (condition 2).

View 9 Replies View Related

Getting SUM Using 3 Conditions?

Mar 6, 2013

I have the following code:
=SUMPRODUCT(--($A$2:$A$400="OKC"),--($C$2:$C$400="AF33"),$G$2:$G$400)

It works great, but I am needing to now add a 3rd condition, or filter... In addition to it looking for "OKC" and "AF33" I also need it to sort by month. example; "March". I need it to be in code that works on old versions of excel as well...

View 6 Replies View Related

Conditions To Sum Every Other Row

Feb 15, 2008

Although I am not getting any errors, I am not having success returning proper answers with the formula below. Perhaps I cannot do what I am attempting.

=SUMPRODUCT(IF(AND($K$22:$K$169="A&B",YEAR($G$22:$G$169)-YEAR('Info'!$F$9)=0),(MOD(ROW($R$22:$R$169),2)=0)*($R$22:$R$169),0))


where: K22:K169 are user entered categories from a drop down list
G22:G169 are user entered dates
F9 is a user entered update date
column R are monetary values with first row being a revenue$ second row margin$

I need to summarize every other row (one row is revenue, one is margin) if the two conditions are met.

View 9 Replies View Related

Sum Between Conditions

Apr 28, 2006

I'm (and you are too!) still helping to streamline a charity's spreadsheet. There are two worksheets that this question refers to: "DD Tally" and "List of DD Donors" (where DD stands for Direct Debit). In the DD Tally worksheet we are trying to summarise the information contained within the List of DD Donors. We would like to be able to estimate how much, in direct debit donation, we will recieve in the financial year (currently, April 06 to March 07). We would like this to be seperated into our monthly, quarterly, semi-annual and annual donors.

The challenge is knowing how to search through a column to find the, for example, "Monthly" entries and once these have been found to find the quantity of the donation(s) in the rows with "Monthly" in them, and then, to determine the number of months they have been paying for during the financial year (their first payment dates are listed as 01/MM/YY) - i.e, the difference between the end of the financial year (03/07) and the start (04/06) or between the time they joined during the financial year and the end. Then to multiply the number of months the direct debit has been active during the year by the amount they donate.

View 6 Replies View Related

If/Then Conditions Being Ignored

Jun 25, 2006

I've been writing a piece of VBA code to process a timesheet for my office.

THe sub routine has a number of variables passed to it, two of which are called CFhrs and Limit. The first contains in integer representing a number of hours. THe latter is a number of hours that can be claimed. In short if CFhrs is less than Limit, the CFhrs should be left alone, but if CFhrs is more than limit then CFhrs should then equal Limit.

First I tried this:


If CFhrs = Limit Or CFhrs > Limit Then
CFhrs = Limit
CFmins = 0
End If

This seemed to be totally ignored when run, and even when CFhrs was greater than Limit, CFhrs was left just the same. So I tried:

CFhrs = IIf(CFhrs < Limit, CFhrs, Limit)
CFmins = IIf(CFhrs < Limit, CFmins, 0)

View 9 Replies View Related

Using If AND OR Conditions In The Formula?

Jun 19, 2014

I am having trouble with formulas below, when i try to use AND, OR, i having trouble .

=IF(B1=SG,IF(A1="I",0,IF(A1="A",0,IF(A1="P",0,IF(A1="D",0,IF(A1="W",0,IF(A1="O",0,IF(A1="B",0,IF(A1="AQ",0,IF(A1="C",0,))))))))))
=IF(B1=LQT,IF(A1="I",150,IF(A1="A",150,IF(A1="P",150,IF(A1="D",44,IF(A1="W",44,IF(A1="O",44,IF(A1="B",0,IF(A1="AQ",0,IF(A1="C",0,))))))))))
=IF(B1=MLT,IF(A1="I",151,IF(A1="A",151,IF(A1="P",151,IF(A1="D",0,IF(A1="W",0,IF(A1="O",0,IF(A1="B",0,IF(A1="AQ",0,IF(A1="C",0,))))))))))
=IF(B1=IBW,IF(A1="I",151,IF(A1="A",151,IF(A1="P",151,IF(A1="D",10+(C2*15%),IF(A1="W",0,IF(A1="O",0,IF(A1="B",0,IF(A1="AQ",0,IF(A1="C",0,))))))))))
=IF(B1=JL,IF(A1="I",151,IF(A1="A",151,IF(A1="P",151,IF(A1="D",0,IF(A1="W",0,IF(A1="O",0,IF(A1="B",0,IF(A1="AQ",0,IF(A1="C",0,))))))))))

View 8 Replies View Related

Sum 2 Columns With 2 Conditions

Mar 22, 2014

SUMPRODUCT(--(Table[[CAT]:[CAT]]=$C5);--(Month(Table[[DATE]:[DATE]])=G$3);--(Table[[IN]:[IN]]))

place the amount from table column "IN" into a corresponding cell in another sheet. how to add another column (OUT) in the above formula. I wish to summarize both column IN and OUT from table based on two conditions.

Workbook example: [URL]

View 3 Replies View Related

Looking For MAX Values Under Conditions

Aug 13, 2007

I have a table (look at attached file for better info) with TEXT values on Column A (A1:A10) and NUMERICAL values on Column B (B1:B10).

I want to find the MAX value between a value that I set (in cell A14) and the last record (as well as the opposite, between the value I set and the first record).

What this means is that if I set for example D as my value (see attached file for better understanding) I want the formula to find the MAX value between B4:B10 (and another formula that finds the MAX value between B4:B1) based on these conditions

The first and last values (i.e B1,B10) are not included in the result.
The value I set is not included in the result as well.

What this means is that if I set the value D which can be located in cell A4, I want to find the MAX between cells B5:B9 (and with another similar formula the MAX value between cells B3:B1).

The value I set changes every time.

I have created a formula as you will see in the attached file but that works only if I create a copy column A to C and then again I can't find a way to exclude the value I set from my results, so if the value I am looking for happens to be the MAX I get that as a result.

View 14 Replies View Related

Reporting With SUM And IF Three Conditions

Feb 2, 2009

I have been trying to create a report that involves three conditions, but so far I have had no luck using SUM and IF conditions to do this.

I have attached a file with an example of what I would need. Basically, I would need the "Resolved" and "In-Progress" quantities filled in below the "Country Report" for each respective country.

View 3 Replies View Related

Setting The Conditions?

Mar 13, 2009

What formula could I use to return the following results.

1, 2, 3,4, 5, 6 = Manhattan
7 through 12 = Bronx
31 = Staten Island

View 2 Replies View Related

Autofilter With More Than Two Conditions

Aug 3, 2009

I have a list of item numbers in a column which is Autofiltered. I can go to the autofilter drop down and then to custom and select two item numbers to allow through the filter, however I have about ten item numbers that I want to allow through the filter.

View 10 Replies View Related

Conditions On VBA Event

Oct 24, 2009

Working in Excel 2003. I have a VBA code that, if a particular option is chosen from a drop down box, then a message box appears. What I'd like to do is alter this code so that if cell J5 has "Text 1", "Text 2", or "Text 3" then the message box does not appear. Here's my

View 3 Replies View Related

COUNTIF With Two Conditions

Feb 11, 2010

I am trying to create a COUNTIF formula which will work with two conditions. If you see the attached spreadsheet you will find the data that I am trying to apply a formula to. I have my data in the table on the right. The table on the left is supposed to show the number which the number of destinations that had a certain range of visitors.

As you will see that there are 3 destinations that had 12 or more million visitors, this was counted using a basic COUNT IF formula but for the rest of my data how can I apply the formula so that the correct number of destinations are counted. For example what formula would be needed to count the number of destinations that have had 8-11.9 million visitors. I am guessing that the formula will have the conditions ">=8" and "<=11.9"?

View 3 Replies View Related

Compare If Conditions Are Met?

Jun 25, 2014

I have two different tables, 1 table gives the conditions you need for specific stations. Stations is shown vertically (10 to 150), and conditions people must have are shown in the top row. (Alphabet). This data is given and can change alot. If I compare this data, a new table will be created that compares the conditions per station with the people if they have it too. Then it will need to give an answer, 'Yes or 'No''. Yes means he has met all the conditions needed, so has all the competences needed for the station.

I tried to do this with normal formulas, but no success. I can do it by doing like 100 IF's in 1 formula, but that isn't efficient.

Also I have done a formula:

IF(SUM(IF(Competentions!$D$21:$BT$21=Competention!$D10:$BT10,0,1))=0,"x",""),

But that only compares if the person has exact the same competences, if he has more then the needed on 1 location, a NO will be returned. Same with count, that doesn't work either, if he has the same amount of competences needed for example station 10, he is allowed to, but he doesnt have the competences that are needed for that station..

View 4 Replies View Related

Looping With Two Conditions

Mar 8, 2009

I have a formula in cell A1 and text in either cell B2 or C2. This text continues down the rows until there is no text in either columns B or C. I wish to copy the formula in A1 into A2 and then continue copying down column A until both cells in column B and C are empty. What is the excel VBA code?

View 2 Replies View Related

Sum Formula With Conditions

Jun 17, 2009

I'm having toruble developing a formula to allow me to add all the values in cells A1 through A100 if their respective quantities are more than 0.

What i mean is if i have the following columns of data:
A B
6 2
2 1
4 0

A being the values added and B being the quantity then i only want A1 and A2 Added together. Therefore the value would be 8.

View 3 Replies View Related







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