In this tutorial, you will find a handful of advanced formula examples that demonstrate how to use Excel's VLOOKUP and SUM or SUMIF functions to look up and sum values based on one or several criteria. Continue reading
by Svetlana Cheusheva, updated on
In this tutorial, you will find a handful of advanced formula examples that demonstrate how to use Excel's VLOOKUP and SUM or SUMIF functions to look up and sum values based on one or several criteria. Continue reading
Comments page 5. Total comments: 443
i need to calculate the average value for male and female students in class. but their title in different page and final mark in different page. need to do it using vlookup..
can i be able to do sum of the various values having base as sku code (ex:20001218 -1
in the same i have the other one to )
Hi,
I have a excle worksheet. in that there are every month salary detail in different month sheet. I want to get total of salary of the year in one sheet against his/her name. How to do it with Vlookup formula. Kindly suggest me.
Thanks...
Great Forum for learning! really appreciate Svetlana & Teams efforts. Thanks!
Hi
Require a help
I have a rows of values like this
5000
2000
7000
15161
5000
In another cell i have a value 25161
In the rows if i add some way i should be getting 25161 ( example 5000+15161+5000) will match my 25161,
Is there any formula to achieve this
what formula i need to use for below
sheet one - GL code, vendor name and Feb amount in column. One vendor has multiple GL codes
Sheet two - Same has above but amount is for JAN
I need to bring jan amount to sheet one next to feb amount to see the varience
since one vendor has multiple gl codes just vlookup formula is not working. What i need to do here
HI
I want to count the value in subgroup for example:
A
B
C
d
d
d
C
d
B
C
d
d
d
I want to know how many "d" are in the first "C" group
Or how many "d" are in the first "B" group
"Count "d" from current value to same value in column.
so tnx
Hi- I need help on following table to combine vlookup and sumif.
Table :
A -2
A 4
A -3
B -4
A -4
B 7
I need formula to calculate only for negative sum from column 2 and vlookup for column.
Results should be like this
A -9
B -4
Can you help to create formula for this?
Thanks, Rahul
sent me in my email i well do for you.
Dear Sir i have 3 sheets of diffrent subject having same table... and i want to find the result in one click... for example i want to find the result of pecentage on single cell by given roll number
Formula Required if in a cell contains 10 digit Pan Number AKRPD3915C if the 4th Letter P it should show as "Person" and if the 4th Letter C it show as "Company"
I need your help, I just want to one cell contain text in other cell list i think formula =ISNUMBER(FIND(E47,B3:B991)) in this E47 is my targeted cell
helo,
please I need your help.
is there any formula that spell a number or any currency ???
Appreciate your support
Hello hope that someone can help me? i need a formula that allows me to sum up the hours worked a day, the problem is it needs to be by name for example.
harry worked from 09:00 till 09:30
carlos from 10:00 till 10:30.
etc
how can i make excel add the worked hours behind carlos his name?
thank you
this is for a working schedule that sums up the worked hours as well.
i have some invoices in sheet1 and i want to make a summary with product name and Quantity in sheet2
so please help me to solve this problem detils are
PRODUCT QTY
AREIL 45G 96
AREIL 500G 12
SAFEGUARD 115G W 72
SAFEGUARD 115G L 144
H&S 200ML CC 6
H&S 200ML B 12
PANTENE 90ML SS 24
PRODUCT QTY
JELLETT BLUE 2+ 24
MACH 3 RAZOR 3
AREIL 45G 24
AREIL 1000G 6
SAFEGUARD 115G W 144
AREIL 500G 6
What formula can return all possible combinations of numbers that add up to a given total. For example, let's say the given total is the number 137. Which combinations of numbers would add up to 137? To make this more interesting, no number can be repeated, and no more than 5 numbers can ever be used in one single try. So 7+35+45+49+1=137, but many more combination do as well. Thank you.
Hello Steven,
It is an interesting task, but I'm afraid we can't calculate it using formulas. It would be useful to find a Maths student with a good knowledge of VBA :)
Hi Everyone and anyone, pls. if you know the formula to the given equation pls. share the answer... Thanks
I have 3 sheets in each three sheets in column A is there are common and different no. how do i get these no. but NOT get repeated in my another "final" sheet,
Second, i want to get the sum of each 3 sheets for column A representing in different cells data to Final sheet.
So, for First result i tried =IFERROR(VLOOKUP('1st Month'!$D4,'2nd Month'!D4:D22,1,0),IFERROR(VLOOKUP('2nd Month'!$D4,'3rd Month'!D4:D23,1,0),IFERROR(VLOOKUP('1st Month'!$D4,'3rd Month'!D4:D25,1,0),"0"))) formula and not sure if this right.
for second Result i Tried = SUMPRODUCT(SUMIF(INDIRECT(""&test&"''!$D$4:$D$19"),$D4,INDIRECT(""&"'!$I$4:$I$19")), Pls Help me in getting the expected answer. Thanks
Hello Rahul,
What concerns your first task, the easiest way would be copying all column A values from three sheets into your final sheet, removing duplicates, and then applying the VLOOKUP formula.
As for summing the corresponding values from three sheets, it sounds like data consolidation is the best option for you. Please see this blog post for detailed steps:
How to consolidate data from multiple worksheets
Hi Maria,
i have 3 sheets in each three sheets column A is the common and different no. how do i get these no. not get repeated in my another "final" sheet.
Second, i want to get the sum of each 3 sheets column A representing data to Final sheet.
So, for First result i tried =IFERROR(VLOOKUP('1st Month'!$D4,'2nd Month'!D4:D22,1,0),IFERROR(VLOOKUP('2nd Month'!$D4,'3rd Month'!D4:D23,1,0),IFERROR(VLOOKUP('1st Month'!$D4,'3rd Month'!D4:D25,1,0),"0"))) formula and not sure if this right.
for second Result i Tried = SUMPRODUCT(SUMIF(INDIRECT(""&test&"''!$D$4:$D$19"),$D4,INDIRECT(""&"'!$I$4:$I$19")), Pls Help me in getting the expected answer. Thanks
Sir
I need help about I have Two Spreed Sheet of Excel I want If Sheet1 Cell F1 is equal to or Greater than 19 then Copy Sheet1 Cell A1:D1 and paste the same in Sheet2 A1:D1 please help me for this formula i have urgently required
Hello Nisar Ahmad,
Please enter the formula below into cell A1 of Sheet 2:
=if(Sheet1!$F$1>=19, Sheet1!A$1,””)
Then copy the formula to all cells in the row: B1 to D1.
Hi Jim,
I have emailed you the excel sheet with the solution which would be more clear to you. Moreover I am not able to attach the excel file in this blog.
Regards,
Ramki
Hello Ramki,
I'm sorry, but we can't seem to find your email. Could you please make sure you sent it to support@ablebits.com? Please include the name of the blog post and the number of your comment.
Good afternoon!
I have a task in which I will be referring to two sheets. On the first sheet, I will have a name column (A1:A200) and a quantity column (B1:B200).
On the second sheet, I will also have a name column and a quantity column, A and B respectively. My task is to search each name of sheet1!A1:A200 for a matching name on sheet2! Where there is a name match, I need to have the quantities added together. I hope you can assist me!
thank you!
Hi
I have managed to get a sumif and combine it with a vlookup and that seems to give me the answers I need, but what I want to do is know when the values I've added reach a defined range of 335-395, and then return me the cell which falls in that range
Any suggestions would be great!!
Thanks
Hello, Helen,
To help you better, we need a sample table with your data in Excel. You can email it to support@ablebits.com. Please add the link to this article and your comment number.
Below the letter A are the number 15, 23 and 15.
Below the letter B are the number 18, 13 and 20.
Below the letter C are the number 50, 19 and 30.
Thanks.
Hello, Dung,
You need an array formula:
=SUM(IF(ISERROR(OFFSET(A2:C6, -1, 0)), 0, IF((OFFSET(A2:C6, -1, 0))="A", 1, 0) ) * (IF(ISNUMBER(A2:C6), A2:C6, 0)))
Your data are in A1:C6. Use the same formula for B and C, just change ="A" correspondingly.
Make sure you press CTRL+SHIFT+ENTER after entering the formula.
Hi Svetlana,
I have those simple data in excel. How can I sum all the number right below letter A, or B or C if the staggering on in order in Excel. Thanks.
A B C
15 18 50
B C A
13 19 23
C A B
30 15 20
hi
I have a expense chart in which I2 to I25 have list of categories.
A is for seriel number
B is for date
C is for amount of expense
D for category
E is for mode of payment
F is for expense category
G is for commulative total
Now I want to make a separate sheet which can show all the list of categories and after each category there should be total of expenses done in that category.
Kindly help me how to do. I wantto make separate sheet for this.
Regards
Gk
Hello, Gk,
Please check if the Split Table add-in can help with your task:
https://www.ablebits.com/excel-split-table/index.php
Hello all,
kindly help
i am making result card of students in ms excel.
i need to add marks obtained and total marks
but
there is a restriction
there are total 7 subjects with different total marks e.g.
English (100), History (100), Mathematics (85), Chemistry (85), Physics (75), Computer (75) and Biology (85).
Rest of subjects are compulsory for students except Biology and Computer
Those who attempt computer will not be attempting Biology and vice versa
so i need a formula to get total marks sum
example what i want
if ( bio == 0 )
{
sum English+History+Mathematics+Chemistry+Physics+Computer
}
%answer is 520 %
else if (comp == 0)
{
sum English+History+Mathematics+Chemistry+Physics+Biology
}
%answer is 530 %
%In case some is absent from computer or biology paper we need to add total of their respective subjects so %
else if ( Comp == 'A' )
{
sum English+History+Mathematics+Chemistry+Physics+Computer
}
else if (Bio == 'A')
{
sum English+History+Mathematics+Chemistry+Physics+Biology
}
waiting for a favourable response
Hello, Yousaf,
To help you better, we need a sample table with your data in Excel. You can email it to support@ablebits.com. Please add the link to this article and your comment number.
If I have a table with the following:
FP2000 30,000
FP2001 45,000
FP2000 50,000
What formula would I use to grab the repeating "FP's" and then sum them up, without using a pivot table?
Hello , i would like to know which formula to use if i have a colum of values and i want to point out the values that would add to a specific number , for example ;
D
1
2
4
8
23
19
7
And out of that range i would do a formula that would tell me which will add up to 29.
Hello, Nicolas,
For us to be able to assist you better, please send us a small sample table with your data in Excel to support@ablebits.com.
Am trying to sum column m where last 6 characters in column a is in month of dec-15, but I only seem to be summing the first occurrance of dec-15 in column a. Any ideas? Thanks for looking.
=SUMIFS(Fees!M2:M110,Fees!A2:A110,RIGHT(TEXT(A58,"mmm-yy"),6))
Hello, Steve,
Please try this array formula:
=SUM((M1:M110) *(RIGHT(TEXT(A1:A110, "mmm-yy"), 6)="Dec-15"))
Make sure you press CTRL + SHIFT + ENTER after entering the formula.
Can the VLOOKUP function be used in conjunction with the SUM function to replace the sum range function argument?
Hello, Gary,
To be able to assist you we need to see your data. Please give us an example.
s-003 $10,450 Sales person: Dan Brown
s-003 $2,001 Sales: $13,349
s-005 $1,900
s-008 $7,832
s-005 $193
s-008 $1,500
s-008 $3,900
s-004 $346
s-004 $263
s-004 $344
s-008 $117
same type but different excell
Hai,
Please send how to calculate excel to excel sumif+vlookup
total qty required in one format
Svetlana
From your about example, {=SUM(VLOOKUP(B2, 'Monthly sales'!$A$2:$M$9, {2,3,4,5,6,7,8,9,10,11,12,13}, FALSE))}, is there anyway to replace the hard coded set {2,3,4,5,6,7,8,9,10,11,12,13} with a cell reference or set of cell reference like {A6,B6,C6,D6}? I would like to not have to edit the set reference every time I change or add a new section to my workbook.
Thanks for the advice!!
Hello, Dennis,
Sorry, looks like this is not possible.
I have a table of 3 columns: Course, Credit and Category:
Course Credits Category
10 3 GE
20 3 GE
22 3 GE
40 3 GE
56 3 Surveys
71 3 Lower Division CW
I have another worksheet where I am entering the courses per instructor and totaling the units
so for Fall 15 semester teacher teaches 3 courses and it totals the units
Cindy 22 40 56 9 units
Bill 71 56 40 9 units
I used a vlookup to calculate the units based on which course was entered and total it by semester by instructor. That works fine.
I want to now total the categories for each semester
Categories
GE
Surveys
Lower Division
It should look up the category associated with the course (Above table course 10 is a GE Category) and count the instances where it finds a course that falls into the GE Category.
GE 15 courses
Surveys 10 courses
Lower Division 9 courses
Any help you can give me will greatly appreciated
Hello Debbie,
Can you please send me your sample workbook at support@ablebits.com?
Dear i have following example data of 3 different clients. Now if i want to sum "Apple", "Orange" etc. then what kind of formula should be use. plz guide.
Ahmed & CO =
APPLE 5 2 3 4
ORANGE 4 1 2 3
LEMON 3 4 5 5
COCONUT 2 1 3 4
Sharif & CO =
ORANGE 4 2 4 2
APPLE 6 4 4 5
COCONUT 3 7 4 6
Sharif & CO =
COCONUT 2 4 3 2
ORANGE 4 3 4 2
APPLE 5 3 2 4
Sl No. ItemID Program Category Efforts
1 P001 Interior Design 120
2 P002 Exterior Drawing 40
3 P003 CAE annotation 33
4 P004 Seating Packaging 456
5 P005 Interior Design 22
6 P006 Interior Drawing 55
7 P007 Exterior annotation 6677
8 P008 Exterior Packaging 244
9 P009 Exterior annotation 786
10 P010 CAE Packaging 44
11 P011 CAE Design 245
12 P012 Seating Packaging 9887
13 P013 Exterior Design 54
14 P014 Exterior Drawing 444
Hi Svetlana,
Please help me to get a formula to get the total efforts when program and category in different rows same.
Exampple : from above data
Sl No. 4 & 12 have same program and category, so their sum is 10343.
Hi
I have an expense report that runs chronologically for an entire year. I would like to have a formula that can sum the amounts by month and by item. I.e. Sum all amounts in column X (highlight entire range) that say January in column Y and "Elect. bill" in column Z. Is this even possible?
I have 50000 entries in excel sheet and i have to do page wise totals. Needs to print on dot matrix printer later on. I also need page wise summary of totals.
there are entries like voucher No.s having different transactions. I want to club the total amount against the one voucher No. instead of repeating it. it will save paper. Please help
Thanks
Very good site , very educative
I have a situation similar to the first example on this page, i.e. fruits in multiple rows and months as columns. The formula is great for finding one fruit and adding multiple columns in the array. However, I have the same fruit listed in multiple rows. I need to add the months amounts for each row that the fruit is listed. Is there a way I can do this in a formula without creating a pivot table?
Thanks
I need a formula to update a sales sheet. as i have multiple of contract numbers in one column and each contract has some value that i want to sum. with pivot table it be done however i need a formula. can please advice...
Contract # Status Car Plate # Pymt_Customer
577 Open 7823 1500
586 Open 7827 0
586 Closed 7827 165
584 Open 7822 1500
584 Closed 7822 -1020
577 Closed 7823 -265
i need to add values corresponding to (say) 4th coloumn if values or data in 1st 2nd and 3rd coloumn match.
division name date expense
sales a 20-Jul-15 1
pdtn b 5-Jul-15 2
sales c 10-Jul-15 3
pdtn d 20-Jul-15 4
sales a 5-Jul-15 5
sales a 10-Jul-15 6
sales a 20-Jul-15 7
sales c 10-Jul-15 8
sales c 5-Jul-15 9
pdtn d 20-Jul-15 10
if data of A , B AND C coloumn match then it should do sum total of values in D
for any new unique combination of A,B and C coloumn a new row automatically should be created
I want the result to be like this
sales a 20-Jul-15 8 (1+7)
pdtn b 5-Jul-15 2
sales c 10-Jul-15 11 (3+8)
pdtn d 20-Jul-15 14 (10+4)
sales a 5-Jul 5
sales a 10-Jul 6
sales c 5-Jul-15 9
can someone help me on this. thanks in advance
Hi, Svetlana. I read your article on SUM and VLOOKUP and I practiced some examples about the combination of SUM and VLOOKUP/ INDEX. And I have some questions relating to the first example in above article.
I want to extract the apples' sales figures for 3 months (Jan, Feb, Mar) separately in 3 cells. I choose 3 cells and enter the same array formula:
{=VLOOKUP("apples",'Monthly sales'!$A$2:$M$9, MATCH({"Jan","Feb","Mar"},'Monthly sales'!$A$1:$M$1,0))}
Result of above formula is 3 cells contain sales figures of 3 months.
And I use INDEX formula and receive the same results:
{=INDEX('Monthly sales'!$A$2:$M$9, MATCH("apples",'Monthly sales'! $A$2:$A$9,0),MATCH({"Jan","Feb","Mar"},'Monthly sales'!$A$1:$M$1,0))}
My PROBLEM is:
1- When I use the combination VLOOKUP with SUM and received a correct result as the following:
{=SUM(VLOOKUP("apples",'Monthly sales'!$A$2:$M$9, MATCH({"Jan","Feb","Mar"},'Monthly sales'!$A$1:$M$1,0)))} =$26,189
2- But when I try to combine SUM with INDEX in a similar way, I only receive the apples'sales of Jan:
{=SUM(INDEX('Monthly sales'!$A$2:$M$9, MATCH("apples",'Monthly sales'! $A$2:$A$9,0),MATCH({"Jan","Feb","Mar"},'Monthly sales'!$A$1:$M$1,0)))} =$2,773
- However, when I calculate the apples' sales for all 12 months by using SUM and INDEX (with col_num =0), I receive the correct result.
{=SUM(INDEX('Monthly sales'!$A$2:$M$9, MATCH("apples",'Monthly sales'! $A$2:$A$9,0),0))} =$172,008
Could you please explain for me why the second formula not return the correct result?
I looking forward to receiving your reply. Thank you.
Hi Svetlana,
Need your expertise again!!! I am suppose to make performance meter but can't get the desired results. Please have a look;
Year Month Name leads Matured Conversion%
2015 June Anju 30 2 7%
2015 June Rekha 28 2 7%
2015 June Somya 35 2 6%
2015 July Anju 40 4 10%
2015 July Rekha 35 5 14%
2015 July Somya 45 5 11%
How to get the average of Conversion% based upon extracting data from below selection:
Select [From Month/Year---> to Month/Year] eg; [2015/June--->2015/July]
Select Name eg; Anju
Result should show Average% of selected Name based upon year and month range selected.
I have been trying vlookup, index & match, sumif but didn't get through.
PURCHASE
SL.No GRADE FINISH THIKNESS WIDTH HEIGHT GRAVITY NO COIL QTY
1 304 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
2 316 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
3 321 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
4 309 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
5 LN-1 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
6 LN-4 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
7 200-S 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
8 SA 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
9 430 15.84 0.6 1500 2200 0.000008 1 Yes 15.84
I need the vlookup formula for the above.
you can see in the second coloumn "GRADE" that is the order may apper many times and need to add the vales of grade. Value is in 'QTY' column. pls let me know how I can do the look up formula.
Hi All,
I have two worksheets.
One listing all days against a individual contract e.g.
Contracts Days
1234 1
1234 4
1234 2
1234 9
1235 1
1235 6
1235 0
1235 11
1236 7
1236 2
1236 20
1237 1
1237 7
1237 5
1237 5
and the other where I want to look this days total up for that contract e.g.
Contract Total days
1234 16
1235 18
1236 29
1237 18
What VLOOKUP & SUM formula would I use as column one would not work as it is SUMing rows.
Maybe,you can try using SUMIF function.
Supposing that in Sheet1 the column Contract_number is A2:A16 and column Days is B2:B16 ; in Sheet2 column Contract is A2:A5
In Sheet2 choose ALL cells B2:B5 and enter a same array formula in Formula bar:
=SUMIF('Sheet1'!A2:A16,=A2:A5,'Sheet2'!B2:B16)
Due to it is an array formula and should be ended by Ctrl+Shift+Enter
hi,
I want to add the individual values of each week for all the months in a year for a list of items.
I need these to be calculated automatically in a different sheet. Could you help me out with this.
For example, the main sheet looks something like the below table:
5Jan - 9Jan 12Jan - 16 Jan etc
Opening count 1 2
New 5 7
Closed 4 6
Backlog 2 3
In sheet2:
I need the following result:
Jan
Opening Count 1
New 12
closed 10
Backlog 3
This needs to be done for all 12 months.
Hello,
I am working on an extensive spreadsheet with thousands of loan numbers, names, document types, ID numbers, etc. My issue is that each week, this company will send me a spreadsheet of thousands of loans but could very well be duplicates of the previous week. I cannot simply use the function "remove duplicates" because the loans are always duplicated with each separate document request and if I have one loan repeated 3x because it requires 3 different document types, that function will remove 2 of them and throws everything off. How can I weed out the prior week's loan numbers and simply identify what loans are new to the current weeks' spreadsheet? Sorry to be so longwinded. :-)
Hi,
I have a budget sheet where there is certain budget is allocated in different months under a certain budget heading. And I have a reporting month cell where I have a dropdown box including the names of the month. Now, what I want is to get the result of the sum of the budget of the activity when i respectively change the month. I also want to get the value, if I click the month to march, then i need the cumulative budget value added till march.
Please help
I have a combination of value such as '1/3 in A1, '3/3 in A2 and '3/6 in A3. Is there a way to sum the that are 1+3+3 so that in the cell I would have 7 and the next cell 3+3+6 that would equal to 12? Basically, I need to sum the 1st values of the A1, A2 and A3 and in the other cell 2nd values of the same cells?
Greetings, I am trying to build a workbook that has 3 sheets. One for entry of first last name and ID number as well as a monetary value like a tip. On the second sheet is the summary page where i wanted the table to return the sum of all information by employee id to give me a total of tips for that employee. The third page i had set up as the reference table where i would enter the First last name and ID number. I tried using your example but still cant get it to work.
I have pasted the formula below.
Can you help?
Im also using google documents
={=SUM(Tips!$c$2:$c$30*IF(Tips!$C$2:$C$30=TRANSPOSE(Employee!$c$2:$c$30),TRANSPOSE(Employee!$c$2:$c16),0)*($C$2:$C$2=$I$1))}
hi,
i have a table in my excel file having different Items date wise, eg:-
Date No. Name Item quantity
1/4/15 106 Ab Apple 50
1/4/15 129 Bd Mango 75
1/4/15 235 Jp Mango 39
2/4/15 114 Tk Mango 63
2/4/15 228 Kl Orange 24
3/4/15 0 0 0 0
4/4/15 0 0 0 0
5/4/15 235 Jp Mango 52
5/4/15 106 Ab Orange 28
...
.
.
.
.
and so on date wise, actually i want to monthly date wise quantity in one cell.
which formula i have to use if i need the quantity of Mango for selected date?
eg. if i put a date 1/4/15 and match with item Mango, so that in a one cell the total quantity should be 114.