Suitable formula needed

vas6566

New Member
Joined
Sep 24, 2019
Messages
20
Office Version
  1. 2010
Platform
  1. Windows
Please check the below table. Here I have sum total of code1, code2 and code3. I need a formula that returns total sum of tax of each code. For example, if manufally, code1 total is 9400, at the same time CODE1's total tax is, if manually calculated, 940. I need suitable formula that return total tax ( mentioned in column B ) of CODE1, CODE2 AND CODE3 just below the sum total of each codes. thanks in advance


ABCDE
1AVTAXCODE1CODE2CODE3
2
1000​
100​
1000​
0​
0​
3
5000​
500​
0​
5000​
0​
4
3000​
300​
0​
0​
1000​
5
7000​
700​
7000​
0​
0​
6
2000​
200​
0​
2000​
0​
7
1500​
150​
0​
0​
1500​
8
1400​
140​
1400​
0​
0​
9
1200​
120​
0​
1200​
0​
10
700​
70​
0​
0​
700​
Total
22800​
2280​
9400​
8200​
3200​
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
I have to say, I have read through your question a few times, and cannot say it is clear to me what you are after. In cases like this, it is often helpful to:
- Post a sample of what your data looks like to start
- Post a sample of your expected output
- Explain the logic of exactly how to get to your expected output based on the sample data
- Provide any pertinent formulas being used

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. The nice thing about this tool is that in addition to showing us the data, it also show exactly what rows and columns your data is in, as well as any formulas being used in the range. Instructions on using this tool can be found here: XL2BB Add-in.

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
How about?:
Book1
ABCDEF
1AVTAXCODE1CODE2CODE3
21000100100000
35000500050000
43000300001000
57000700700000
62000200020000
71500150001500
81400140140000
91200120012000
107007000700
11Total228002280940082003200
12Tax940820520
Sheet1
Cell Formulas
RangeFormula
B11:F11B11=SUM(B2:B10)
D12:F12D12=SUM((D2:D10<>0)*$C$2:$C$10)


But I'm not sure if that is what you want. A list of expected results would be helpful.
 
Upvote 0
You can copy the mini-sheet into a blank using the copy icon
Copy icon.png
 
Upvote 0
How about?:
Book1
ABCDEF
1AVTAXCODE1CODE2CODE3
21000100100000
35000500050000
43000300001000
57000700700000
62000200020000
71500150001500
81400140140000
91200120012000
107007000700
11Total228002280940082003200
12Tax940820520
Sheet1
Cell Formulas
RangeFormula
B11:F11B11=SUM(B2:B10)
D12:F12D12=SUM((D2:D10<>0)*$C$2:$C$10)


But I'm not sure if that is what you want. A list of expected results would be helpful.
The expected result in row no. 12 correct. But formula when pasted in separate excel sheet shows error value . As seen below

AVTAXCODE1CODE2CODE3
1000​
100​
1000​
0​
0​
5000​
500​
0​
5000​
0​
3000​
300​
0​
0​
1000​
7000​
700​
7000​
0​
0​
2000​
200​
0​
2000​
0​
1500​
150​
0​
0​
1500​
1400​
140​
1400​
0​
0​
1200​
120​
0​
1200​
0​
700​
70​
0​
0​
700​
Total
22800​
2280​
9400​
8200​
3200​
Tax
#VALUE!​
#VALUE!​
#VALUE!​
 
Upvote 0
Can you share the XL2BB? or the file? Or the formula as you have it in the cell with error?
 
Upvote 1
The expected result in row no. 12 correct. But formula when pasted in separate excel sheet shows error value . As seen below

AVTAXCODE1CODE2CODE3
1000​
100​
1000​
0​
0​
5000​
500​
0​
5000​
0​
3000​
300​
0​
0​
1000​
7000​
700​
7000​
0​
0​
2000​
200​
0​
2000​
0​
1500​
150​
0​
0​
1500​
1400​
140​
1400​
0​
0​
1200​
120​
0​
1200​
0​
700​
70​
0​
0​
700​
Total
22800​
2280​
9400​
8200​
3200​
Tax
#VALUE!​
#VALUE!​
#VALUE!​
Hi I am tryping to upload the excel sheet, but the the portal accepts only images like jpg formats. If possible can you guide me how to upload excel file with reply.
 
Last edited by a moderator:
Upvote 0
Can you share the XL2BB? or the file? Or the formula as you have it in the cell with error?
AVTAXCODE1CODE2CODE3
1000​
100​
1000​
0​
0​
5000​
500​
0​
5000​
0​
3000​
300​
0​
0​
1000​
7000​
700​
7000​
0​
0​
2000​
200​
0​
2000​
0​
1500​
150​
0​
0​
1500​
1400​
140​
1400​
0​
0​
1200​
120​
0​
1200​
0​
700​
70​
0​
0​
700​
Total
22800​
2280​
9400​
8200​
3200​
Tax
#VALUE!​
#VALUE!​
#VALUE!​
=SUM((D2:D10<>0)*$C$2:$C$10)=SUM((E2:E10<>0)*$C$2:$C$10)=SUM((F2:F10<>0)*$C$2:$C$10)
 
Upvote 0
If you are getting the #VALUE error, that suggests that all or some your numbers are actually entered as text, and not numbers.
Re-enter them, and it should work out.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,179
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top