Sum Several Cells Depending If Satisfy Several Criteria

Jul 27, 2012

I have a table with several criterias (Name of supplier, date, amount paid to this supplier). This table is my inputs. Each time I have an expense, I put down the name of the supplier and the amount of the expense and the date when it occurs.

I have another table with name of each supplier in rows and the date in column. Sometimes I have 2 amount for a same supplier for the same month. I would like this amounts sum in my table. I cant find a good formula to do it efficiently.

Obviously I can do a sum

(if(A2=B2, if(c6=c8);b10)+sum(if(A2=B2, if(c6=c8);b10)+ etc...

But I can 150 expenses per month...

View 2 Replies


ADVERTISEMENT

Summing Columns Only If They Satisfy Criteria

Jul 31, 2006

I am having an excel problem such that i have several months in a given year and I want to set up a formula where I can enter a specific year and it will return the sum of all the cells that belong to that year (see attached sheet). So basically if I have 2 months in 2006, 2 in 2007 and 2 in 2008 with corresponding values for each of those months, I want to enter a year in another part of the sheet and a value is returned to me to show me the sum of the revenue for all the months that are in that year. So if I enter 2007, it will sum both those values that belong to 2007.

The years and months are dynamic so I can't just sum the columns because in column D it could be 2006 (depending on the other inputs of my spreadsheet) or it could be 2007, so I essentially need some formula that checks the array to see if that cell belongs in a year that matches the criteria and if it does sum it to all the values that match that criteria. I have tried using vlookup, match, index but can't get it to work.

View 2 Replies View Related

Excel 2010 :: Using IF And Results That Satisfy 2 Of 3 Criteria

Apr 30, 2014

I'm trying to evaluate if 2 of the 3 criteria are met using an IF function in Excel 2010.

I have 3 columns of data. Each column has a number ranging from 0-15.
Example:
B2 = 0
C2 = 3
D2 = 4

Since B2 = 0, I'd like to have the equation return a 'Yes' because there are values greater than 0 for 2 of the three cells.

The hangup is that any of the three cells could potentially equal 0, so the equation must account for C2 or D2 being zero.

View 4 Replies View Related

Count Cells That Satisfy A Condition

Apr 30, 2007

I have cells in a column, which contains text and numbers. I want to count the number of cells that have value greater than zero.

I tried using DCOUNT, but I got no idea why is its not working
=DCOUNT(I15:I114,1,J5)
where the values are form I15 to I114.. and J5 contains the condition >0

Also, while I am at it.. Is there a straightforward way in excel to get the count of the max run of cells with values greater than zero.

for e.g if cells from 18 to 30 have values greater than zero , and cells 44 to 50 have values greater than zero. then I want it to return 13. i.e (30-18)

I am hoping that there is a simpler way than looping through the column in VBA

View 6 Replies View Related

Conditional Format (with Formulas) 10 Cells Depending On 1 Criteria

Oct 19, 2009

I want to colour 10 cells (A1-J1) if I type in yes in cell K1. Using conditional formatting Im only able to colour 1 cell. Is this possible without using VBA?

View 5 Replies View Related

Macro To Lock Cells In Protected Sheet Depending On Criteria

Dec 13, 2007

I have a Workbook that I use to log invoices and credit notes and it is password protected so that the cells that contain formulas are locked and therefore not selectable.

What I wanted to know is. Is it possible to lock other cells depending on what values are in certain cells?

Let me explain. I have Columns G & H which contain the heading 'Credit Note Number' & 'Credit Note Amount'. Now in columns I & J I have the heading 'Invoice Number' & 'Invoice Amount' respectively.

What I have done is to make a condional formatting so that If I put a value in cells in column G it will change the colour of the adjacent cells in columns I & J, likewise If I fill in cells in column I the conditional formatting will change the colour of adjacent cells in coulumn G & H. This helps me to see whether a row contains a credit note or an invoice.

What I would ideally like is for a Macro that would automatically locks cells G & H in a particular row that I am currently working on if I enter data into the cell in column I. Likewise if I am entering data in column G in the row I am currently working on for a credit note, then lock columns I & J in the row I am currently in.

Any Ideas how this can be done? Also can locking and unlocking of cells be done in VBA while the sheet is protected or would the macro need to temporarily unprotect sheet, lock the cells then protect sheet again?

PS: I have uploaded a Jpeg of what my conditional formatting does to try and illustrate what it is I need.

View 14 Replies View Related

How To Satisfy Multiple Conditions Using Multiple Criteria

Oct 16, 2009

I'm trying to divide my data into 6 different groups, based on 2 different criteria. First, I am not sure how to write the logical test to take 2 columns of data into consideration (using "&" and "AND" do not work; I am not sure what else to try), and second I can't figure out how to write the formula so that it can select from 1 of 6 conditions.

So, overall here is what I want:

If DL2=3 and CK2=1, then I want this to be labeled as '1'
If DL2=3 and CK2=2, 2
If DL2=1 and CK2=2, 3
If DL2=2 and CK2=2, 4
If DL2=1 and CK2=1, 5
If DL2=2 and CK2=1, 6

These 6 conditions cover all possible combinations of numbers in the two columns.

View 13 Replies View Related

Insert Formula Depending On Cells Depending Of Variables?

Jan 27, 2014

In a macro I want to automatically insert a formula in several cells. The formula depends on other cells, and I want to be able to manipulate these cells with variables. Here is my code:

[Code] .....

All my variables are declared:

Sheets("DATOS YTD 2014").Cells(I, Semana + 1) is the cell I want to be able to chose due to the variables
Sheets("DATOS YTD 2014").Cells(I, 3) is the reference cell for the VLOOKUP formula, that will vary with I
SheetMonth.Range("B3:W172") is a range in the sheet SheetMonth which is fixed

The error message I receive is the following: "Run-time error 13, Type mismatch"

I precise that the next step is to make the ",6," part in the vlookup formula also variable... but I guess once my current issue is solved this one will be a piece of cake.

View 3 Replies View Related

Increment If Condition Satisfy

Jan 26, 2007

I have a few (eg file1, file2, file3, file4, file5) files in a directory and i want to open them as individual excel file and I need to do a check on all the opened files first. If Cells(11, 4) = "important", then Count will start from 0 and workbook will be saved as wb_0 , wb_1 and so on. Else the workbook will be discarded and close. So if file2 and file4 are the only 2 files that satisfy the condition, then they will be saved as wb_0.xls and wb_1.xls.?

ChDir "C:Documents and SettingsDesktop"
For x = 1 To 5
Workbooks.OpenText Filename:= _
MyArray(x) _
, Origin:=xlWindows, StartRow:=1, DataType:=xlDelimited, TextQualifier _
:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, Semicolon:= _
False, Comma:=False, Space:=True, Other:=False, FieldInfo:=Array(Array( _
1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1), Array(8, _
1), Array(9, 1)) .....................

View 5 Replies View Related

Only Return Values That Satisfy Both Filters?

Jan 30, 2014

I have a worksheet that contains Country Abbreviations and related Codes. Some countries have multiple codes. How would I search for two countries and have it return me only the codes that are related to BOTH countries and not just one country.

Example:
Code Country
1 USA
2 GBR
3 HON
4 GBR
4 USA
5 HON
6 USA
6 HON
6 GBR

If I typed in or selected USA and GBR it would only return 4 and 6, not 1 and 2. If I use filters it returns 1, 2, 4, and 6.

type in the three-letter country abbreviations or be able to select them from a list and it return the correct code(s).

View 1 Replies View Related

Extracting Certain Data Depending On Criteria

Sep 8, 2009

Have a perfect working spreadsheet, but now need to extract certain bits of data depending on one criteria.

Each row contains data in different columns.

What i need to do is depending on the criteria of a cell (i.e. whether its Y or N) i would like to extract certain cells onto another worksheet all within the smae work book

i.e for example
If i have columns A,B,C,D,E and F and then x amount of rows (as these can change as data is entered) if a Y is entered in F then it extracts the data out of columns A, C and D

View 14 Replies View Related

Find Data Depending On Two Criteria

Nov 9, 2009

I Have want two find the dates and the data of these dates
depending on the two criteria i have

note"the two criteria would be left(b3,4) and right (b3,4)

ex
in f3"date" i want to find the dates correspond with these two criteria
and then find the data of these dates in G3 Depending on the two criteria too.

Sheet1

ABCDEFG2DateData
Criteria1Criteria2DateResult31/1/2008M111 GG1G M113
M191M1131/2/2008M191 G1GG M11341/2/2008M191 G1GG M113

1/5/2008M191 G78GG M11351/2/2008M111 GG1G M113

1/8/2008M191 G1G9G9 M11361/3/2008M141 GG5G M113

71/4/2008M118 GG6G M113

81/5/2008M191 G78GG M113

91/5/2008M141 GG5G M113

101/6/2008M111 GG2G M113

View 9 Replies View Related

Copy Columns Depending On Criteria

Dec 6, 2007

I have attached a spreadsheet.

I have a dump of about 4000 calls (I have minimised the attachment for size sake) that I need to do certain reports on.

The second sheet (dump) has the data in its raw form from our call reporting tool. The 1st sheet (Report) is a broken down version the powers that be wish to see.

My formula needs to meet certain criteria, as you can see I only have 6 columns on the (Report) sheet where as the dump has lots !

The (report) sheet needs to list the Parent Case ID only if the Summary column has BSR at the beginning, if it meets this criteria then it lists the other relevant columns in the (report) sheet.

View 5 Replies View Related

Finding The MAX In A Group Of Cell Depending On A Criteria

Jun 25, 2007

I'm trying to find a way that I could get the MAX value in a group of cells depending on a critieria. The situation is that I have a list of numbers and a list of dates parallel to it. I would like to find the MAX for, say, the numbers corresponding to the month of June. I would like to be able to change the month and get the MAX for each month on request.

Eg.
18-MAY-2007 600
01-JUN-2007 500
02-JUN-2007 400
28-JUN-2007 600
12-JUL-2007 700
17-JUL-2007 200

I need formula that will give me "600" if the month I want is June. Ideally I would not want to have to filter the data, so SUBTOTAL would probably not work for me.

View 10 Replies View Related

Sumproduct Formula Needs To Halve A Value Depending On Criteria

Aug 10, 2009

The current spreadsheets add up each persons totals by matching the name in each tab with the name of the person who won the job located in service orders tab. BUT.....If two salesman pair up on up on a job then the formula doesn't recognize the joint name. eg Scott/Ash in row 21 & 22 (Service orders). I need the totals to half the job and add it to the salesmans total accordingly.

View 4 Replies View Related

Hide/unhide Columns Depending On Criteria

Jan 11, 2010

I am trying to hide or unhide columns E:BL depending if the the cell value in row 54 contains a value (Note cells in row 54 contain formulas). I have written the following code but get a runtime error on the else statement.

Sub UpdateCashflow()
Application. ScreenUpdating = False
ActiveSheet. Unprotect Password:="LD"
ActiveSheet.Select
Dim c As Integer
For c = 5 To 64
If Cells(54, c) = "" Then
ActiveSheet.Range(Cells(54, c)).EntireColumn.Hidden = True
Else
ActiveSheet.Range(Cells(54, c)).EntireColumn.Hidden = False
End If

Next c

ActiveSheet.Protect Password:="LD", DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.EnableEvents = True
'
End Sub

View 4 Replies View Related

Array Of Columns / SUMIF A Particular Column / Depending On A Certain Criteria

Jul 24, 2014

I have a download from an accounting general ledger which has the following:

Column A: Category Description
Column B: Country
Column C: Department
Row 1: Months
Note: Each row contains the last 12 months worth of costs

As the categories/criteria can appear multiple times, and there are thousands of lines, I have been using SUMIFS to calculate totals my required combinations (eg. Travel expense, Germany, Sales department)

Every month, the information refreshes to show the most recent 12 months worth of data. And this means I need to manually update my formulas to correct the month column headings, as everything moves by 1 month.

Would something like a SUMIF with a SUMPRODUCT work? Eg. if current month = July, then it would sum everything from the July column automatically?

View 4 Replies View Related

Excel 2007 :: Calculate Total Value Depending On Certain Criteria

Jan 27, 2013

I use Windows Vista and Excel 2007.

So to cut to the chase :

On my spreadsheet, I have 6 main groups of columns, each one comprising 4 columns with their own automated calculations across the range.

Group 1: Cell H5, Cell I5, Cell J5, Cell K5
Group 2: Cell L5, Cell M5, Cell N5, Cell O5
Group 3: Cell P5, Cell Q5, Cell R5, Cell S5
Group 4: Cell T5, Cell U5, Cell V5, Cell W5
Group 5: Cell X5, Cell Y5, Cell Z5, Cell AA5
Group 6: Cell AB5, Cell AC5, Cell Ad5, Cell AE5

Then I have two columns following those: Col AG, Col AI

In each one of those two columns, I am trying to sum up a total value using The IF Function.

In Cell AG5 : the sum of the values of cells K5+O5+S5+W5+AA5+AE5,

ONLY IF the values of Cells H5, L5, P5, T5,X5, AB5 is equal to AG3 (which is a symbol (wingding 3 for capital P), this occurs 3 times out of 6, sometimes twice only, and at random, so I need the sum of 3 cells (or 2) out of 6, based on the above criteria.

Same in Cell AI5: sum of the values of cells K5+O5+S5+W5+AA5+AE5

ONLY IF the values of Cells H5, L5, P5, T5,X5, AB5 is equal to AI3 (which is a symbol (wingding 3 for capital L), this again occurs 3 times out of 6, sometimes twice and again at random, so again I need the sum of 3 cells (or 2) out of 6, based on the above criteria.

Using the formula: =IF(T5=AI3,(W5),0) , I retrieved the value of cell W5 into cell AI5; and when I tried the formula :

=IF(T5=AG3,(W5),0) , in cell AG5, it returned the value 0 which is correct again, as T5 was equal to AI3 but NOT to AG3.

But I cannot work out how to add all of the three values relating to each symbol, independently in each column, as they each occur randomly.

This is the way it looks in the spreadsheet:

Cell H5 Cell I5 Cell J5 Cell K5/ Cell L5 Cell M5 Cell N5 Cell O5/
Symbol (for P) Text Text Value /Symbol (for L) Text Text Value

And so on 4 more times across.

I could of course add it all manually for each line but I would rather have a formula to do it for me as all the other calculations are automated and/or conditionally formatted.

View 9 Replies View Related

Cell Lookup - Calculation Depending On Criteria Column?

Jun 29, 2013

Criteria
Column B

Constant
Variable0
Variable1
Variable2
Variable3

2
[Variable2/Constant]

5
123
43
45
76

[Code] ..

This is my table. What formula should I use so that Column B shows the calculation depending on the Criteria column?

View 9 Replies View Related

How To Link 1 Master Log To 4 Regional Logs Depending On Criteria From Column

Mar 20, 2013

I have a large Master Log (One Log to Rule Them All.xlsx) with data from 4 regions that I want to link to 4 Regional Logs (Region 2 03-22-13.xlsx, Region 3 03-22-13.xlsx, etc) and populate based on criteria found in column B, titled "County." Let's assume the county names are "Alpha," "Bravo," "Charlie," etc. So if the county is "Alpha," that row should only be linked to Region 2, if it's "Bravo" or "Charlie," it should only be linked to Region 3, etc.

To further complicate things, the 4 Regional Logs get renamed every week, so I will have to re-do this process weekly, so I need it to be simple and quick, plus we email these regional logs weekly, so I need to be able to break any links, or do something else, so that people around the state will see information, even though they don't have the Master Log. I also need the Regional Logs' formatting, spacing, etc to be identical to the Master Log.

I want this so I can edit the Master Log, and when the individual Regional Logs are opened they are automatically updated with the information from the Master Log, regardless if the Master Log is opened or closed. But I also need the Master Log to reflect changes done individually to the Regional Logs, in case someone else edits things.

View 12 Replies View Related

Sum Range Of Cells Depending On Changeable Values In Other Cells

Aug 2, 2012

Assuming I have a data set like this :

column a column b
916 12,5
916 23,4
923 34,5
923 23,9
932 98,6
934 67,7

How can I get a sum of all cells in column b when values in column a are equal?

View 5 Replies View Related

Getting Value Depending On Changes Of 2 Cells

Jul 10, 2014

I have an issue with this for a couple of days actually..

I have to find in a certain date "column C" if User "column D" changes from the initial user's number to another one to gave me the first half sales of the day and then obtain the other sales of the other part, this must reestart again when the date changes.

I have to know what was the sales on the two parts of the day and then in column Q assign "Manana", S1 Cell or R1 Cell for second part of day

The User "column D", can be diferent each day.

I attach the excel data to get a better explanation on this.

Mov may-jul FARMAX.xlsx

View 7 Replies View Related

Colouring Many Cells, Depending On The Value Of One

Mar 28, 2007

I'm trying to automatically shade a number of cells dependant on the value in a single cell. ie. If D2="quote" then I want A2:Q2 to be yellow. If D2="Design" then I want A2:Q2 to be green etc etc. I have about 6 options in all of what D2 could be.
I then want to repeat this for about 200 rows.

View 7 Replies View Related

Conditional Formatting Depending On Two Other Cells?

Jan 27, 2014

On the attached spreadsheet, is there a way of highlighting a cell because it is a greater number than two other cells?

Can cell C3 be highlighted green because the number is greater than G3 and K3?

Can cell E3 be highlighted green because the number is greater than A3 and I3?

Can cell K4 be highlighted green because the number is greater than C4 and G4?

View 8 Replies View Related

Hyperlink To Other Sheets Depending On Cells

Jan 6, 2009

how I would do the following, as I have been having a play but not managed to get anything.

I have two cells, C10 and C11, they both contain numbers. I want to create a hyper link that goes to the sheet called: Semester C11 Year C10

e.g. if the cell values are 2 and 1 respectively, I want the link to go to the sheet called 'Semester 1 Year 2'

View 9 Replies View Related

Seperate Cells Depending On Content

Jun 24, 2009

I have some workbooks that have some serials in A row and i need to seperate them depending on how many digits they have,

For example some have 13 digits,and some 8.I just want to seperate them into different rows.

Here is a sample

seperate sample.xls

View 5 Replies View Related

Display R, A Or G Depending On Text In 2 Other Cells

Apr 15, 2009

I am trying to nest a formula with IF & AND to work out a RAG status. I have 2 questions per row (in Columns I:J) which will be answered either Yes or No. For each combination I need to give a RAG status in Column K – e.g. two Yes replies give Green, 2 No replies give no and one No out of 2 will give Amber

Below is hoped for response in Column K:

ColI---Col--- JCol K
Q1----Q2----RAG
Yes---Yes---G
Yes---No----A
No----Yes---A
No----No----R

View 3 Replies View Related

To Change Color Of Cells Depending On Value

Nov 10, 2008

when I execute this code on the selected cells, it completely ignores my selection, and makes the entire worksheet black.

Sub ColorCells()

Dim cell As Range

For Each cell In Selection

If cell.Value = "U" Then
cells.Interior.Color = 3

View 9 Replies View Related

'shift Cells Right' Depending On Value Of Cell

Jan 4, 2010

I need a macro that will "examine" the text of column B for every row checking to see if the text "Proper Text" is in the cell and if not, execute this code for that cell and then move on to perfrom the same until it finds an empty cell:

Selection.Insert Shift:=xlToRight
Range("B2085").Select
ActiveCell.FormulaR1C1 = "Click for detail image"
With ActiveCell.Characters(Start:=1, Length:=22).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic

Note that "B2085" above is the cell number that the script stops on to execute this code.

View 9 Replies View Related

Cut / Paste And Shift Cells Depending On Value In A:1

May 11, 2006

I am trying to make a macro to take a set of data and shift the data range down depending on the value in the A:1 cell. For example if the data in column A starts with 5, 6, 7, 8 and so on.... I would like to copy/ paste and shift the column down 5 cells so I can start A:1 at 0.....so that the data can begin as 0,1,2,3,4,5.....etc.

View 3 Replies View Related







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