Sum of values based on variable values

PRADEEPSWALSE

New Member
Joined
Nov 27, 2018
Messages
28
Office Version
  1. 2013
Platform
  1. Windows
Hi,
I need help for addition of variable values.
E.g. Values in column 'B' are variable. I want SUM of values mentioned in column 'C' based on values of column 'B'. I have total 10 rows. Values of column 'B' are variable and it will be entered by user. Some cell may be empty. Refer attached Images for easy understanding.

Please suggest solution for this query.
Thanks in advance.

Regards,
Pradeep
 

Attachments

  • Excel Query.JPG
    Excel Query.JPG
    31.6 KB · Views: 12

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Hi
Try the formula
Excel Formula:
C23=SUMIF($B$2:$C$11,B23,$C$2:$C$11)
 
Upvote 0
Based on the screen capture,
Book1
BC
22ThqQty
232510
245013
25755
26  
27  
28  
29  
30  
31  
32  
33  
Sheet2
Cell Formulas
RangeFormula
B23:B33B23=IF(B22="","",IFERROR(AGGREGATE(15,6,$B$8:$B$18,1+COUNTIF($B$8:$B$18,"<="&N(B22))),""))
C23:C33C23=IF(B23="","",SUMIF($B$8:$B$18,B23,$C$8:$C$18))
 
Upvote 0
Solution
Hi,
I need help for addition of variable values.
E.g. Values in column 'B' are variable. I want SUM of values mentioned in column 'C' based on values of column 'B'. I have total 10 rows. Values of column 'B' are variable and it will be entered by user. Some cell may be empty. Refer attached Images for easy understanding.

Please suggest solution for this query.
Thanks in advance.

Regards,
Pradeep
Hi
Try the formula
Excel Formula:
C23=SUMIF($B$2:$C$11,B23,$C$2:$C$11)
Hi,

Thanks for the reply. But my requirement is little bit different.
 
Upvote 0
Based on the screen capture,
Book1
BC
22ThqQty
232510
245013
25755
26  
27  
28  
29  
30  
31  
32  
33  
Sheet2
Cell Formulas
RangeFormula
B23:B33B23=IF(B22="","",IFERROR(AGGREGATE(15,6,$B$8:$B$18,1+COUNTIF($B$8:$B$18,"<="&N(B22))),""))
C23:C33C23=IF(B23="","",SUMIF($B$8:$B$18,B23,$C$8:$C$18))
Hi,

Thanks for the reply.
It works very nicely and my problem is resolved. Thank you.
 
Upvote 0
Hi,

Thanks for the reply. But my requirement is little bit different.
Hi,
Again I need help in addition depends on two variable values. i.e. pipe size and thk. Quantity to be calculated based on pipe size and thk. Please refer OUTPUT SHEET for your ready reference.

Values of column 'B' and 'C'are variable and it will be entered by user. Some cell may be empty.
Please suggest solution for this query.
Thanks in advance.


Regards,
Pradeep
 

Attachments

  • Query-2.JPG
    Query-2.JPG
    51.3 KB · Views: 8
Upvote 0
Are you still using excel 2013, or have you upgraded since you set up your profile? This will be much easier if you have the UNIQUE function from office 365.

Also, are the pipe sizes in column B formatted numbers, or text strings? This can be tested with the formula
Excel Formula:
=COUNT(B5:B19)
If the pipe sizes are formatted numbers then this will count them, if they are text it will not count anything.
 
Upvote 0
Are you still using excel 2013, or have you upgraded since you set up your profile? This will be much easier if you have the UNIQUE function from office 365.

Also, are the pipe sizes in column B formatted numbers, or text strings? This can be tested with the formula
Excel Formula:
=COUNT(B5:B19)
If the pipe sizes are formatted numbers then this will count them, if they are text it will not count anything.
Hi,

Thanks for reply.
Yes... I am using excel 2013.

I can please elaborate the solution provided by you. I have not understood.
 
Upvote 0
It wasn't a solution, it was a question! The purpose of the formula is to identify the format of your pipe sizes.

If you use that formula with the sample from post 6 it should either return 10 or 0
 
Upvote 0
It wasn't a solution, it was a question! The purpose of the formula is to identify the format of your pipe sizes.

If you use that formula with the sample from post 6 it should either return 10 or 0
Okay.
Pipe size column (B5:B19) return to zero.
 
Upvote 0

Forum statistics

Threads
1,214,782
Messages
6,121,532
Members
449,037
Latest member
tmmotairi

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