So, I need to find an Excel 2003 substitute for =SUMIFS, which is only 2007+ (apparently).
The formula is used to generate this summary data table, from a list of revenue, where each revenue line has the field type (static, email or outreach) and the field fund (ABC, QRS and XYZ).
type fund total count average
static ABC $12,390.88 171 $72.46
email ABC $6,051.32 65 $93.10
outreach ABC $8,835.00 138 $64.02
static QRS $12,925.44 79 $163.61
email QRS $9,305.44 99 $93.99
outreach QRS $1,799.00 49 $36.71
static XYZ $4,912.20 36 $136.45
email XYZ $75.00 2 $37.50
outreach XYZ $0.00 0 #DIV/0!
This is the formula
`=SUMIFS('revenue'!G:G,'revenue'!AH:AH,Sheet2!A2,'revenue'!AI:AI,Sheet2!B2)`
Where G is a dollar amount, and AH and AI are matching the type or fund column.
How do i get this to work in Excel 2003?
The way I ended up getting past this was to create a column that combined the two columns I needed to check (ABCstatic, ABCemail, etc.) Doing it this way allowed me to use just one 'SUMIF' (using two SUMIF clauses linked together results in OR-ing of the conditions, rather than AND-ing).
=SUMIF(Revenue!AJ2:AJ6400,Sheet2!A2, Revenue!G2:G6400)
=SUMPRODUCT(((Revenue!$AH2:$AH10=Sheet2!A2)+(Revenue!$AI2:$AI10=Sheet2!A2))*(Revenue!$G2:$G10))
I don't think you can use full columns with SUMPRODUCT, so you'll have to pick a range sufficiently large. Or use some dynamic range names.
Related
I would like to extract a price value based on two other columns. In table 1, I am given the raw data where I want to draw from. In Table 2, I am given only the contract number, and I would like to find the type being "Mater" and have the price listed out for it.
I've tried to use this formula but I don't think I am calling the columns correctly.
=IF(AND(Table2!A1=Table1!$A$1:$A$6,Table1$C$1:$C$6="Mater"),Table1!$D$2:$D$6,"")
Is there a formula using index match, if(and), or another one that could work in this case?
Thank you!
Table 1.
Contract
Work
Type
Cost
5321a
aaa
Labor
52
5321a
ab
Mater
57
5641a
aba
Mater
10
536451a
aae
Labor
75
2441a
aan
Labor
42
53421
aar
Mater
14
Table 2
Contract
Mater Cost
5321a
57
5641a
57
53421
14
The following should work:
=SUMIFS(Sheet1!D2:D7,Sheet1!A2:A7,A2,Sheet1!C2:C7,"Mater")
(I'm assuming the first table in on Sheet1)
I have two separate tables in an Excel worksheet, as illustrated below.
Columns A, B, E, F and G are my input values;
I want a formula that generates the values in Column C
(shown in italics):
A
B
C
D
E
F
G
1
Name
Value
Type
Type
Lower
Upper
2
Andy
35
Spam
Spam
35
39
3
Mark
85
Foo
Ham
25
27
4
Pat
28
N/A
Eggs
91
95
5
Deb
93
Eggs
Foo
82
86
6
Emily
92
Eggs
Bar
65
69
7
Greg
22
N/A
8
Gary
67
Bar
For each row in the first table (i.e., each person),
I want to find that person’s Type based on their Value (Column B)
by finding the row in the second table where the person’s Value
falls within the Lower→Upper range (Columns F and G).
So, for example, Mark (Row 3) has a Type of “Foo”
because his Value (85) falls between 82 and 86,
associated with “Foo” in Row 5 of the second table.
Note that Pat’s Value is 28 (Row 4), which does not match any range.
The ranges are inclusive.
For example, Andy’s Type is “Spam” (Row 2) even though his Value (35)
equals the Lower end of the range for “Spam” (Cell F2).
I know nested IFs are quite hard to debug in Excel,
so I’d like to avoid that if possible.
Modify your source table to show the lower limit for each grade and then use a VLOOKUP with a approximate match
Update to show how to include blank ranges
Filter Solution
If you don't have access to the FILTER function, one option is an INDEX/MATCH array formula, which will need confirmed with Ctrl+Shift+Enter.
=INDEX($F$2:$F$6,MATCH(1,($G$2:$G$6<=B2)*($H$2:$H$6>=B2),0),)
Another option is LOOKUP, which does not need Ctrl+Shift+Enter.
=LOOKUP(1,1/(($G$2:$G$6<=B2)*($H$2:$H$6>=B2)),$F$2:$F$6)
I am giving a homework exercise that the student can submit in singles or pairs. The solutions are submitted in a Google form with three fields: submitter1, submitter2 (optional), solution. The submissions automatically go into a Google spreadsheet with four columns: submitter1, submitter2, solution, and grade (filled in by the TA). For example:
submitter1 submitter2 solution grade
111 222 x 100
333 y 90
444 555 z 80
I would like to create a second sheet that automatically lists the grades of each submitter alone, e.g:
submitter grade
111 100
222 100
333 90
444 80
555 80
The order in the second table is not important.
Is there a way to do this in Google spreadsheet?
Alternatively, is there a way to do this in another spreadsheet software, such as LibreOffice Calc or Excel? (in that case I could copy the spreadsheet to that program and do the calculations there, though it is less convenient than doing it directly in Google spreadsheet).
EDIT: The main problem is to collect all submitter IDs into a single column. I do not know in advance how many submissions there will be, and how many of them will be single/pair. I tried to put in the "submitter" column:
=IF(ISBLANK(Sheet1!A2),Sheet1!$B$2,Sheet1!A2)
and copy it downwards. This gives me all the first-submitters, and then the first second-submitter. But then how to automatically take the next second-submitters?
List the submitters with this in A2,
=ArrayFormula(UNIQUE(TRANSPOSE(SPLIT(CONCATENATE(Sheet1!A2:B&CHAR(9)),CHAR(9)))))
Retrieve their grades with this formula,
=index(Sheet1!D:D, iferror(match(A2, Sheet1!A:A, 0), match(A2, Sheet1!B:B, 0)))
Linked google-sheet here (updated)
=UNIQUE({{Sheet1!A:A,Sheet1!D:D};{Sheet1!B:B,Sheet1!D:D}})
Arrange arrays and do the formulas. QUERY to remove blanks, if needed:
=QUERY(UNIQUE({{Sheet1!A:A,Sheet1!D:D};{Sheet1!B:B,Sheet1!D:D}}),"Select Col1,Col2 Where Col1 is not null")
I have list of records which I want to assign to three people (eg.) equally.
So for example with 15 records, to split to three people named XYZ, PQR and ABC:
Case Name
123 XYZ
124 XYZ
135 XYZ
138 ABC
145 ABC
167 ABC
258 PQR
259 PQR
260 PQR
Considering your Comment, if Case is in A1 and three people's names are in F2:F4 (ie in Column4) please try in B2 and copied down to suit:
=OFFSET(B$2,INT(ROW()-2)/COUNTA(F:F)-COUNTA(F:F)*INT((ROW()-2)/COUNTA(F:F)^2),4)
You have a list of Cases to be assigned “equally” over a pool of People.
However, the Cases can only be assigned “equally” is their number is an exact multiple of the number of People, otherwise the residual cases will be assigned as per the order in the list of people, i.e. if you have 31 cases to be distributed among 4 individuals, then three people will have 8 cases while the remaining one will receive 7.
Assuming the list of Cases (including header) is located at B6:B40 and the list of People (also with header) is at G6:G10, and blank records, if any, are at the end of each list. (These formulas will work with Cases coded as numeric or alpha)
To assign the cases one by one to each person enter the following FormulaArray in the range C7:C40
(Formulas Array are entered by pressing [Ctrl] + [Shift] + [Enter] together)
=IF($B$7:$B$40="","",INDEX($G$7:$G$10,
1+MOD(-1+COUNTA($G$7:$G$10)
+(1+ROW($B$7:$B$40)-ROW($B$7)),
COUNTA($G$7:$G$10))))
Fig. 1
To assign the cases using the pattern shown in the sample data we need first to add a field to the list of persons in order to calculate the distribution of the cases (this makes the formula to allocate people easier to read, maintain and shorter) . In cell H6 enter the field name Count then in range H7:H10 enter this FormulaArray:
=IF($G$7:$G$10="","",
INT(COUNTA($B$7:$B$40)/COUNTA($G$7:$G$10))
+((1+ROW($G$7:$G$10)-ROW($G$7))<=
MOD(COUNTA($B$7:$B$40),COUNTA($G$7:$G$10)))*1)
Fig. 2
Then enter this `FormulaArray` in `E7` and copy to the end of the range.
=IFERROR(IF($B7="","",
IF(COUNTIF($G$7:$G$10,$E6)=0,
INDEX($G$7:$G$10,MATCH(0,COUNTIF(E$6:E6,$G$7:$G$10),0)*1),
IF(COUNTIF($E$6:$E6,$E6)<INDEX($H$7:$H$10,MATCH($E6,$G$7:$G$10,0)),$E6,
INDEX($G$7:$G$10,MATCH(0,COUNTIF(E$6:E6,$G$7:$G$10),0)*1)))),"")
Fig. 3
I have two Excel spreadsheets. One contains average numerical grade for a student and the other a list of letter grades for numeric grades between a min and max
Spreadsheet 1
Student Avg Letter Grade
Mike 91
Joe 76
Mary 84
Sally 78
Spreadsheet 2
Min Max LetterGrade
90 100 A
81 89 B
71 80 C
61 70 D
0 60 F
How do I return the proper grade for each student in Tableau? It seems trivial but I can't figure out the calculation. Thank you for your help!!!
There is an easier way to do this by using Groups.
Import Spreadsheet 1 as a data source
Right Click on "Avg" and select Create Group
From there use Shift Click to group your ranges using Spreadsheet 2 as your reference, using labels "A, B, C"
On the top of the Create Group dialog box, make sure you rename your Field Name as "Letter Grade"
The weakness of this approach is that you have to check/redefine your groups if you are updating your data source. Using IF-ELSEIF statements may be more flexible as Inox suggested in the comments. But this is a relatively easy trick, without any programming involved. :-)
For more info, visit: http://kb.tableau.com/articles/knowledgebase/use-ad-hoc-groups-categorize
Hope this helps!