SUMIF (add The Values Of An Array)
Nov 5, 2008
I've been manually writing IF statements out for ranges of data that could easily be done with a little array work. So I set out to convert all my functions into something more readable and quicker to write. But I ran into a problem. I want to add the values of an array G45:Z45 if the corresponding values in G44:Z45 are less than or equal to P41. So I thought to use a SUMIF:
=SUMIF(G44:Z45,<=+P41,G45:Z45)
That didn't work, in fact, it didn't come error free until I did:
=SUMIF(G44:Z45,"<="+P41,G45:Z45)
But that doesn't add anything up either. From what I can see, the problem lies within the condition. If I simply put P41, it works. The moment I add <= I get a multitude of problems.
View 2 Replies
ADVERTISEMENT
Oct 25, 2007
I am trying to pull cell values similar to a SUMIF function (SUMIF(range,criteria,sum_range)). For example, in A1 I use a data list created from data elsewhere on the spreadsheet. In the data I created elsewhere, there are 2 columns being used. The 1st column is the information that is being used to create the list and the second column contains specific values (number or text). In the dropdown menu I select an available value (text or number) . When I have selected that value I would like cell A2 to show what the cell directly to the right of it shows from the data I have elsewhere in the spreadsheet as mentioned. I have tried the SUMIF function however it seems to exclude certain values (number or text) and I am not sure what else to use.
View 9 Replies
View Related
Feb 7, 2008
I am preparing an analysis of my company's expenses for the last two years by account. One on excel sheet I have the raw data,
bank account, payee, payment date, clear date, amount, payment type
(This is from all accounts for the whole 2 year period.)
In the second sheet, I have a summary schedule setup. The summary is setup like this:
Account #
Row 1: Begin Date
Row 2: End Date
Payment Type 1 AAAAAAA
Payment Type 2 BBBBBBBB
I would like to come up with a formula that will populate AAAAA & BBBBB for a given account during a given time period. For example, I would like it to give me the total of Type 1 payments from account 12 during the period January 2, 2005 through January 27, 2006.
Right now it is only giving me the info for 1 payment type and 1 account. Here is what I have now {=SUM(IF(Detail!$G$10:$G$3942>=R$5,IF(Detail!$G$10:$G$3942
View 10 Replies
View Related
Sep 18, 2007
does the SUMIF worksheetfunction in VBA work on Arrays? I know it will work on ranges, and thats all fine, but I am convinced it should work on an array too... for example... Just assume two columns of numbers (A and B) with 13 rows -
Public Sub test()
Dim a As Range, b As Range
Dim x, y
x = ActiveSheet.Range("A1:A13").Value
y = ActiveSheet.Range("B1:B13").Value
Set a = ActiveSheet.Range("A1:A13")
Set b = ActiveSheet.Range("B1:B13")
MsgBox Application.WorksheetFunction.Sum(x) 'works
MsgBox Application.WorksheetFunction.Sum(y) 'works
MsgBox Application.WorksheetFunction.SumIf(x, "1", y) 'wont work - "Object Required"
MsgBox Application.WorksheetFunction.SumIf(a, "1", b)
End Sub
I also tried Transposing the x and y arrays, but the same result "Object Required".
View 4 Replies
View Related
Apr 7, 2014
In sheet1 I have name(column A) and value(column B)
In sheet2 I have name (column C) and key(column D)
In sheet 3 I have results
Example ( It is just a total nonsense example, the real data is net inflow of some funds that are unique)
Sheet1
House 1000
Car 1500
pet 2000
Sheet 2
house1
car1
pet2
So in the sheet 3 I want to put a formula that is capable to sum all values of the sheet2 if the name has a key of 1in the sheet2, the key columns has values of 1 or 2
I think in SQL will be something with join and group by with having clause.
The result will be 2500 in the sheet 3.
What I tried: My attempt is to do something like this code ( using array functions).
View 7 Replies
View Related
Jan 15, 2010
I've hit a major brick wall and hoping someone will be able to help! I've written an array formula to replace a pivot table (long story) anyway, they now want to be able to filter the data by date (between two dates) i'm using the current formula:
{=SUM(IF('SAP Data Current'!$A$2:$A$39802='Payment Block by Ac. Clerk Cal'!$B$84,IF('SAP Data Current'!$I$2:$I$39802='Payment Block by Ac. Clerk Cal'!$C101,IF('SAP Data Current'!$B$2:$B$39802='Payment Block by Ac. Clerk Cal'!S$2,'SAP Data Current'!$AA$2:$AA$39802,0),0),0))}
I know I need to put it at the beginning, but not sure how! I have the following formula for between dates:
=SUMIF(B2:B24,"<="&F7,C2:C24)+SUMIF(B2:B24,"<="&F8,C2:C24)
but then this isn't working right either!
View 13 Replies
View Related
Jul 19, 2013
I currently have a Row with this value
row1 lh lh lh
row2 8 12 8 5 2
First I will need to check if the column has an "lh" if true then sum row2, however i will need a second condition that will check that if >8 it will use the value 8 instead of 12.
However if value is<=8 get that value from the cell.
In this case the correct answer is
8 + 8 + 5 = 21
8 (because it is <=8 get the value from the cell) + 8 (because 12 is>8 use the value "8") + 5 (because <=8)
View 3 Replies
View Related
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
Feb 10, 2014
I have a list of Items and the quantities of those items on one sheet. Each item has a section location number as well. (three Columns, Item, Quantity, and Section Location). the list can repeat the same item multiple times.
This is why I then have a summary sheet to uses a SUMIF formula to sum the quantities of a given item that are in a givin section. which my SUMIF Formula works great for. But my problem is some items have the word "LUMP" as its quantity and not a number. I want to add to my array formula so if the item does have a LUMP quantity and the lump quantity is in the section location to put LUMP on the summary sheet. here is my formula
=SUM(IF((ProjectInfo!$AE$2:$AE$307 =$B59)*(ProjectInfo!$AD$2:$AD$307= AA$10),ProjectInfo!$AF$2:$AF$307,""))
projectInfo is the sheet where the list is. Column AE is the Item column on the projectinfo sheet column B on the summary sheet would be the item that i want to sum the quantities for Column AD is the section location column on the projectinfo sheet the AA$10 is the row and column of the section location i want to limit the sum of the quantities to the formula is in cell AA59 So it will sum all the quantities in the list on the projectinfo sheet if the item and section location match whats specified on the summary sheet.
getting LUMP to display if its a lump quantity. The Lump can only show up if the item on the projectinfo sheet has LUMP for that Item AND in that section location.
EDIT: Column AF on the ProjectInfo Sheet is the quantity column
View 5 Replies
View Related
Jan 14, 2009
I would like to have a formula in one cell that finds records on another sheet that meet certain criteria, and produces a sum of the total quantities associated with that record. The attached workbook has more details as to what I am trying to do.
View 2 Replies
View Related
Jan 3, 2012
I am trying to use the SUM IF Array formula to sum a group of numbers that fall under a heading of reference numbers over several sheets of data. For example purposes lets say my spreadsheet looks something like the below.
A
B
C
D
E
1
2600000248391
2600000393805
[code]......
The first two digits of the heading numbers are the criteria I am trying to use to separate and sum the data. For example I need to sum the value of the data below headings that falls between 1400000000000 and 1499999999999.
For the example above I used the below formula for the current Sheet and it works fine.
{=SUM(IF(A1:E1>="1400000000000",IF(A1:E1="1400000000000",IF(Sheet1!A1:E1,Sheet2!A1:E1
View 5 Replies
View Related
Oct 2, 2008
I have a class module with several private variables, including one that is an array of a user-defined type. I am trying to set the values of a single element of this array with "Property Let ..." from a string array:
View 4 Replies
View Related
Oct 22, 2013
Question contained within code:
Code:
Dim MyArray(6, 1) As String
Dim i As Integer
'' Array List 1
[Code]....
'If lbxLI = any list index from Array List 1 then use the value stored in Array List 2 to give Listbox 2 its rowsource.
'For example; ListIndex "0" would produce a row source "_0" for listbox 2. Else if ListIndex "1" is selected, produce row source "_1" for listbox 2.
' I would like to achieve this from one "If" statement. I'm guessing it must be possible using a loop, I just can't think how despite a lot of messing about with code.
View 1 Replies
View Related
Oct 6, 2008
I'm using this formula below but it's not rounding up correctly.
=SUMIF('[Bill''s Angels Bowling.xlsx]Variables'!$D$8:$D$71,V3,'[Bill''s Angels Bowling.xlsx]Variables'!$I$8:$I$71)
The list of numbers is follow
45.815625
34.509375
30.7125
21.009375
Should be as follow
46
35
31
21
Total should be 133 I'm getting 132
View 4 Replies
View Related
Jul 24, 2009
I've created an example of what I'm working on since it involves personal information. See Attachment...
ExampleExcel.xlsx
I need to use 2 criteria to determine the Sum value for A2 thru A5. The Account# and the Type# below row 7 need to be the same as those listed to the right of the Sum column (A2:A5). I can change the Account# and Type# to text, but the Sum Range needs to be numbers.
I was able to Sum based on the Account range (=SUMIF(Account,B2,Sum), but I still need to make the Type range part of the criteria.
As you can see in the attachment, A2 = 8 when it should = 2 (as seen in row 8 under Sum Range).
View 7 Replies
View Related
Jun 12, 2009
I am thinking I need a sumif formula but having difficulty pulling data into sheet. The facts....
Sheet 1 (Summary Model): Location where I want to dump data
Sheet 2 ('Phys Demand Estimates_0-17'): Location where data exists
=IF('Phys Demand Estimates_0-17'!A2:A953='Summary Model'!B2,IF('Phys Demand Estimates_0-17'!C2:C953='Summary Model'!A5,SUM('Phys Demand Estimates_0-17'!E2:E953),0))
Translated...."IF in Sheet 2 looking up duplicate fields of Value1 = same value in list box on Sheet 1, and if in Sheet 2 looking up duplicate fields of Value2 in static list in Sheet 1, sum the values in Row E in Sheet 2.
View 4 Replies
View Related
Sep 1, 2009
I have numbers in cell K1 to K59 with the following formula =SUMIF (A1:A59,"nm",K1:K59). The formula only adds up the numbers from K1:K48.
View 2 Replies
View Related
Jan 8, 2008
I want to do a SUMIF formula and add only certain words in column A.
Column A has a list of airlines in it, and column H has a list of flight durations. I want to add together all of the flight times but for only a few airlines.
I tried to put OR in the middle of the SUMIF function, but it didn't work:
=SUMIF(C:C, "Air Canada" OR "Air Tahtiti Nui", H:H)
How would I get it to add together all of the flight times for Air Canada and Tahiti Nui, without having to put many SUMIF formulae?
View 9 Replies
View Related
Nov 24, 2006
I have an example, see attached. I am trying to find the sum of a number of columns where the critera is between a number of days ie values is greater than 365 but less than 1788 days. The values to sum is the amount for each row where this criteria is met.
View 7 Replies
View Related
Apr 13, 2009
I am trying to summarise data from 50 different files (updated by 50 different users) into one file in one place. To do this I created a simple sumif function that links to those files. This sumif works correctly when those files are open. But when I open my output file after changes have been made to one or more of 50 input files, sumif function doesn't work when I hit update at the file opening pop up question and get #value error. If I start opening those files this error goes away and it works great again.
View 2 Replies
View Related
Jun 12, 2003
Sumif formula. I need to somehow put a loop on the criteria or something...
The formula is sumif(range, criteria, sum range). The problem I am having is that I have about 20 criteria to select, and sumif is designed for one criteria. I know that I can type the exact same formaula in and have something like this...
=SUMIF(D25:D107,Variables!A6,F25:F108) + SUMIF(D25:D107,Variables!A7,F25:F108) + SUMIF(D25:D107,Variables!A8,F25:F108) + SUMIF(D25:D107,Variables!A9,F25:F108)+ SUMIF(D26:D107,Variables!A10,F26:F108)+ SUMIF(D26:D107,Variables!A11,F26:F108)
This is OK for a few variables but some formulas have multiple criteria in excess of 15-20. the other thing is that the criteria list will grow over time as more variable are added, and instead of changing the formulas throughout the spreadsheet, I would like to have a big range that I can slowly fill up as I go along
The ideal situation would be if I could put a range in ( ie A6:A30) and then when I get a new criteria I just add it to this range. This will make administration eaaseier by giving me one location to update data.
I will show you an example.. I want to calculate the amount of petrol I use based on three criteria - BP, Shell, Caltex ( the criteria being petrol stations that come up on my bill).
Column
A/ B / C/ D
Row / description / Amount/Variables
1 / Shell Petrol / $10/Shell
2 / Cat Food/$13/BP
3 / BP Store/$24 / Caltex
4 / Dog Food/$23
5/Shell Petrol / $98
6/Caltex Petrol/$31
7/BP stuff/$30
8/Shell Store/$70
What I have been doing is this...
=sumif(B1:B8,D1,c1:c8) + sumif(B1:B8,D2,c1:c8) + sumif(B1:B8,D3,c1:c8)
If I could somehow get the formula to choose the whole column D as the criteria range and get the 'sum if' to somehow loop so it goes down the d column and does the same calculation, but just changes the criteria variable each time, then instead of changing the formula, I could just add to the D column each time I had a new criteria I wanted to check.
I looked into DSUM and Pivot Tables. DSUM seems to work well with numbers, not variables and Pivot tables did my head in, especially seeing I know that there is a way to do this in a formula based way..
View 9 Replies
View Related
Oct 5, 2007
I have a column of multiple text values I want to pull and then in another column pull the value. I can do it on just one value =SUMIF(Sheet3!$F:$F,"NEX",Sheet3!K:K) but need to include multiple text values. Also if the text is not found I want it to return a "0".
I'm stuck on how to pull the mulitple text.
View 9 Replies
View Related
Feb 15, 2008
I thought that SUMIF FUNCTION should work for what I am trying to achive but it does not look like.
Here is the example: 1,2,3 etc. are rows and A, B,C - columns
A B
1 Gain (Loss) on Balance sheet reval, 91105(2,035,611)
2 Expense
3
4 NET Gain (Loss) on LTD 945,600
5 including Hedge on $ million Revenue
I need to write the formula in cell e.g. A8 that would look at my either "Expense" or "Revenue" and sum it if it is revenue or sumit if it is expense. I have the whole spreadsheet of rows and the label "revenue" or "expense" repeats almost always after 2 rows.
View 9 Replies
View Related
Jun 27, 2014
I'm currently using the below formula to calculate the values within a certain date range.
=SUMIFS(C2:C100,B2:B100,">=2014-06-27",B2:B100,"
View 5 Replies
View Related
Jul 2, 2008
I have a problem which is beyond my capabilities. I need excel to sum amount column (See example table below) by unique values in company column then conditionally sum those values based on the year of investment, stage of company and finally, the kicker, the summed Amount by unique companies value has to be less than a certain threshold.
For example, I want companies in Stage Column of Exit only and in year 2004 only BUT only if the sum of the Amounts by unique company values is less than 100. So in the example table this would return 0. I have code and criteria written to sum unique values based on similar criteria such as sum if company Stage is Seed and Year is 2004 but for the life of me I can't seem to make the jump further.
For Unique values I used this function:
=SUMPRODUCT(($B$2:$B2=Year04)*($D$2:$D2=StageS)*($A$2:$A2=$A2))=1
Then:
=DCOUNTA($A$1:$D9999,2, Criteria)
or
=DSUM($A$1:$D9999,2, Criteria)
This along with criteria explained before returns the number of unique companies that are Stage=Seed and Year=2004 or sum of amounts with that criteria.
I am trying to adapt this technique to get what I want but to this point have been unsuccessful. My best guess is that I will need to create an array of the unique companies (New Sheet column A) with the Summed Amounts (New sheet column B) and then run functions again with the easier equations and criteria? I am trying to avoid combining company records as each investment needs to remain individual and there are 16000 records. Any help would be greatly appreciated.
Company Year Amount Stage XYZ 2004 10 Seed XYZ 2004 20 Seed ABC 2004 5 Early ABC 2004 25 Early DEV 2004 14 Later DEV 2004 19 Later TRU 2004 100 Exit TRU 2004 120 Exit TRU 2004 100 Exit
View 9 Replies
View Related
Jul 19, 2007
I want use the formula sumif...something like that! =SUMIF(I77:I176;AND(>F1092;<F1091);Q77:Q176). I want sum the values between q77:Q176 if the value in i77:i176 is >F1092 and <F1091 But the multiple criteriun donīt work in the sumif.
View 8 Replies
View Related
Aug 3, 2006
i have a very large spreadsheet filled with telephone numberS and some other codes that go with them...i need to match the codes with the phone numbers.
Sub TRCO()
Dim TNs As Long
Dim i As Long
Dim TempArray() As String
Dim TRCO As String
Dim CD03 As String
Dim ASOC As Range
TRCO = "TRCO"
CD03 = "CD034DF1"
'Filter TN's
Columns("B:B").EntireColumn.Insert
Set tempRange = Range("A6", Range("A65000").End(xlUp))
With tempRange
. AdvancedFilter _...................
View 2 Replies
View Related
Aug 2, 2014
I am using Office/Excel 2007 and Windows 8
I want to determine the number of values SUMIF/SUMPRODUCT functions used/checked to arrive at the answer, i.e. 95 for row 2 and 116 for row 3. A function that can give a 3 and 2 respectively.
Example:
Results for Row #2 gives: 95 with 3 values picked up under "Rate"
Results for Row #3 gives: 116 with 2 values though three places were checked up under "Rate"
How can I count the number of these values referencing at the "Rate" like in the functions used.
I managed to use SUMIF/SUMPRODUCT functions to calculate totals based on "Rate" in row one.
I tried COUNTIF function, but allows only field/heading.
A
B
C
D
E
F
G
[Code] ..........
results for each formula used
95 formula: =SUMIF(B$1:G$1,B$1,B2:G2)
95 formula: =SUMPRODUCT((B$1:G$1=B$1)*(B2:G2))
3 formula: =COUNTIF(B1:G2,B1)
View 9 Replies
View Related
Dec 18, 2009
I have included my budget so helpers can see it. I am trying creating a formula on mini-dashboard on A8 (Under the total budgeted amount) that will check the total budgeted amount based on the values I enter on the categories sheet. Of course it will be controlled using the drop down menu on A2 on mini-dashboard. I thought I had this working with a sumif function but it seems to have quit working.
View 2 Replies
View Related
Sep 17, 2009
I need to perform 2 SUMIF's on 2 columns of data to return a result and I'm not quite sure the best way of doing this. I'll give an example below.
I have 2 columns of data, both numeric and the SUMIF needs to say if H1:H100="10" and also if J1:J100="907". I can perform one or the other but not both.
View 6 Replies
View Related