quicker way in microsoft excel - excel-2010

Ultimately, I need to figure out the quickest way to get the total for the de-duplicated donors on this donation list. I know how to do this by using AutoSum. For example I could get the total for Orthopaedics by typing =SUM(C1, C2, C3, C4) That would equal 1500.
Here is an example of what is going to be on the excel table.
DATE NAME Value
10/10/2012 , Orthopaedics 500
10/20/2011 , Orthopaedics 250
10/10/2012 , Orthopaedics 500
10/20/2011 , Orthopaedics 250
8/12/2011 , John 500
8/12/2011 , John 500
10/10/2011 , John 100
1/2/2013 , Andres 500
8/10/2011 , Andres 1000
12/26/2013 John Smith 500
10/2/2012 Alex Taster 1000
10/26/2011 Jared Comes 250
10/27/2011 Shawn Derek 2000
I wonder if I could create a tab/line that I could copy and paste it to get the total for each group.
The difficult part is that the number of donations for each donor varies.
It might be something like: =If(NAME = B1) SUM(C1 + C?) the question mark for that line.
I am looking for a quicker way to get the total for each donor, who might have one or multiple donations.

I think a simple Sumif will do:
=SUMIF($B:$B,$B2,$C:$C)
This will give the total for each Donator.

Related

My ArrayFormula with SUM and non-contiguous fields is not calculating correct totals per row

I have a spreadsheet (Google Sheets) with several non-contiguous Cost columns. When I try to user ArrayFormula to sum each row "Grand Total", it's returning some interesting (incorrect) numbers.
Here's a sample, stripped down the number of cost columns for brevity.
Venue Cost
Moving
Moving Details
AV Support
Grand Total
1500
500
500
2500
2500
500
750
3750
1500
500
500
2500
My Array Formula for the Grand Total Column is
=ARRAYFORMULA(filter(G2:G, G2:G<>"") + SUM(H2:H,J2:J))
where G is the Venue Cost and H and J are additional costs.
This is the resulting Grand Total:
Venue Cost
Moving
Moving Details
AV Support
Grand Total
1500
500
500
4750
2500
500
750
5750
1500
500
500
4750
I tried moving away from SUM, to just manually adding the additional costs together.
=ARRAYFORMULA(filter(G2:G, G2:G<>"") + (J2:J + H2:H ))
but received the #N/A error, which expanded to "Error: Array arguments to ADD are of different size." We have a document generating tool that sees those N/A's as additional jobs to process, so any extra spillover is not good:
Venue Cost
Moving
Moving Details
AV Support
Grand Total
1500
500
500
2500
2500
500
750
3750
1500
500
500
2500
#N/A
#N/A
I'm pretty sure that the SUM and the ADD versions are including more than one row, do I need to filter the 'Additional Costs' Columns as well as the Venue Costs? Or, are the non-contiguous columns an issue?
Thank you!
try:
=INDEX(IF(G2:G="",,G2:G+H2:H+J2:J))
or:
=BYROW({G2:H, J2:J}, LAMBDA(x, SUM(x)))
or:
=BYROW({G2:H, J2:J}, LAMBDA(x, IFERROR(1/(1/SUM(x)))))
or:
=BYROW({G2:INDEX(H:H, COUNTA(G:G)), J2:INDEX(J:J, COUNTA(G:G))}, LAMBDA(x, SUM(x)))
I don't know if I fully understand what you're trying to accomplish, but try this:
=ARRAYFORMULA(IF(G2:G="","",G2:G+H2:H+J2:J))

Google Sheet "If" between two numbers is not working [duplicate]

I'm trying to set up a formula with multiple IF statements between number ranges but I'm seeing the error:
Formula parse error
Here is the forumula:
=IF((AND(A2>0,A2<500),"Less than 500",
If(AND(A2>=500,A2<1000),"Between 500 and 1000"),
If(AND(A2>=1000,A2<1500),"Between 1000 and 1500"),
If(AND(A2>=1500,A2<2000),"Between 1500 and 2000")))
It's a little tricky because of the nested IFs but here is my answer (confirmed in Google Spreadsheets):
=IF(AND(A2>=0, A2<500), "Less than 500",
IF(AND(A2>=500, A2<1000), "Between 500 and 1000",
IF(AND(A2>=1000, A2<1500), "Between 1000 and 1500",
IF(AND(A2>=1500, A2<2000), "Between 1500 and 2000", "Undefined"))))
I suggest using vlookup function to get the nearest match.
Step 1
Prepare data range and name it: 'numberRange':
Select the range. Go to menu: Data → Named ranges... → define the new named range.
Step 2
Use this simple formula:
=VLOOKUP(A2,numberRange,2)
This way you can ommit errors, and easily correct the result.
standalone one cell solution based on VLOOKUP
US syntax:
=IFERROR(ARRAYFORMULA(IF(LEN(A2:A),
IF(A2:A>2000, "More than 2000",VLOOKUP(A2:A,
{{(TRANSPOSE({{{0; "Less than 500"},
{500; "Between 500 and 1000"}},
{{1000; "Between 1000 and 1500"},
{1500; "Between 1500 and 2000"}}}))}}, 2)),)), )
EU syntax:
=IFERROR(ARRAYFORMULA(IF(LEN(A2:A);
IF(A2:A>2000; "More than 2000";VLOOKUP(A2:A;
{{(TRANSPOSE({{{0; "Less than 500"}\
{500; "Between 500 and 1000"}}\
{{1000; "Between 1000 and 1500"}\
{1500; "Between 1500 and 2000"}}}))}}; 2));)); )
alternatives: https://webapps.stackexchange.com/questions/123729/
For multiple conditions that are sequential, Google sheets provides the more efficient and legible IFS formula:
=IFS(
A2<500, "Less than 500",
A2<1000, "Between 500 and 1000",
A2<1500, "Between 1000 and 1500",
A2<2000, "Between 1500 and 2000" )
You could also add a condition for cases less than 0 or greater than 2000, but this is basically what you asked.
Shorter than accepted A, easily extensible and addresses 0 and below:
=if(or(A2<=0,A2>2000),"?",if(A2<500,"Less than 500","Between "&500*int(A2/500)&" and "&500*(int(A2/500)+1)))

Find percentage between two matching column values in a different row

I need to find the percentage between finished / unfinished. However I can't just divide across a single row, as the countries need to match. Is there a specific formula that can help do this?
Below is an example of the data:
COUNTRY
UNFINISHED
COUNTRY
FINISHED
US
500
CA
150
UK
300
US
200
CA
300
UK
170
Is there a way to calculate finished / unfinished, but still have US / US and UK / UK?
use two vlookups:
=VLOOKUP(F2,C:D,2,false)/vlookup(F2,A:B,2,false)

Automate Spreadsheet Calculation

I'm trying to build out a spreadsheet formula that will allow me to take one list of numbers and evenly distribute them into another list of numbers. Attaching an example below.
I'm sure there's a way to automate this process but I've done extensive research online and can't seem to figure out the right combination of existing formulas to make this work, would greatly appreciate any resources or tips to point me in the right direction. Currently using G Sheets.
Example spreadsheet: https://docs.google.com/spreadsheets/d/1JgFKXGJ2-eQEXAGtqu64p_Zw7gY2fVpEtuCFDvMb9YE/edit#gid=1179066278
List 1:
1000
500
List #2:
300
600
200
100
200
100
Desired result:
List 1 value -> List 2 values that add up to List 1 value
1000 -> 300, 600, 100
500 -> 200, 100, 200
try this partial solution:
=ARRAYFORMULA(TRANSPOSE(QUERY({ FILTER(A:A, A:A<=C3, A:A<>""), MMULT(
TRANSPOSE((ROW(INDIRECT("B1:B"&COUNTA(FILTER(A:A, A:A<=C3, A:A<>""))))<=
TRANSPOSE( ROW(INDIRECT("B1:B"&COUNTA(FILTER(A:A, A:A<=C3, A:A<>""))))))*
FILTER(A:A, A:A<=C3, A:A<>"")), SIGN(FILTER(A:A, A:A<=C3, A:A<>"")))},
"select Col1 where Col2 <="&C3)))
side note: it will give you only the exact number (as you request) or lower number (one number short)

Formula to condtionally sum an array of values from one sheet to give totals on another

I have two sheets, connected by ID, which contain details of events and charges.
Sheet1 (breakdown of charges):
[Oh, just discovered I'm not allowed to include screen shots. I apparently need 10 reputation points. Not sure how to show you my spreadsheet now...]
ID DBF PCC Extras
1 200
1 100
3 200
4 350
4 250
4 75
4 25
7 100
[Sorry this will probably look horrible, I can't figure out how to include a spreadseet snippet without using an image. I had 3 imaage all prepared ready.]
Sheet2 (indentification and summary information):
ID Type Name
3 MON Edwards
7 REC Smith
4 WDG Jones
1 FNL West
8 WDG Richards
9 WDG Morrison
11 INT Gray
I am trying to add three additional columns to sheet 2 so that it shows a summary of the charges for each event. I would the charges information to update automatically in sheet2 as detail is added to sheet 1.
The resulting sheet2 will look like this:
ID Type Name DBF PCC Extras
3 MON Edwards 200
7 REC Smith 100
4 WDG Jones 350 250 100
1 FNL West 100 200
8 WDG Richards
9 WDG Morrison
11 INT Gray
As data for ID 8, 9 and 11 is added to sheet1, the summations should automatically appear in sheet2.
I have been trying to create an array formula to put in sheet2:B2, something like this:
=QUERY('Log Items'!A:F, "select sum(C), sum(D), sum(E), sum(F) where A="&A:A, 0)
This produces the correct result for ID 1 but it stops there and I'm not sure why. Also, despite my 0 as the third parameter, the header row is output.
I tried encapsulating the above in an ARRAYFORMULA but get a parse error.
I have also tried various combinations of ARRAYFORMULA, SUM and IF but not got anything that works. For example:
=ARRAYFORMULA(SUM(IF('Log Items'!A:A=A:A,'Log Items'!C:E,0)))
This gives #N/A "argument out of range", which I don't understand.
Although I've been working with Excel for a while, I'm really new to Google's Array formulas but have mananged to use them successfully in other parts of my spreadsheet and found them really powerful.
If anyone could help me with this, I would be very grateful.
In Sheet2!D2:
=ARRAYFORMULA(IF(A2:A,MMULT(N(A2:A=TRANSPOSE('Log Items'!A2:A)),N('Log Items'!B2:D)),))
Note: the N() functions have become necessary with different coercion behaviour in the new version of Sheets. They can be omitted in the classic version.
MMULT usage

Resources