Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SUMIF Question???

Status
Not open for further replies.

Ryon

Technical User
Nov 1, 2002
64
US
ALL,
I have 2 colums in a workbook, one named taxrate and the other is tax. I am trying to get the total of the tax column WHERE the taxrate = 7% any Ideas.
TAXRATE TOTAL
7% 198.00
6% 444.00
7% 123.00
6% 433.55
6% 343.54
----------------
total at 7%

Thank,
ryan
 
You do need VBA to calculate this. Assume your table starts at A1 (TAXRATE). Use array formula in cell B7:
{=SUM(IF(A2:A6=7%;B2:B6)}
To enter array formula (in { ... } brackets), write it without first "{" and last "}" brackets, and, when still in edit mode, hold down SHIFT and CTRL keys and press ENTER. (After this you should see those brackets in edit window)
To improve your formula, you can put 7% in cell A7 and replace 7% in the formula B7 with reference A7. Now, changing A7 value will also change the sum.
 
continue...
PLS replace semicolon by comma in above. The simpler SUMIF spreadsheet formula:
=SUMIF(A2:A6,7%,B2:B6)

For huge number of rows and more tax options, or using external data, a pivot table can be a good solution for quick calculation and changes in presentation option.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top