SUMIF formula question

jdotbonk

New Member
Joined
Feb 26, 2022
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Greetings,

My goal here is to add up grand totals at the top of the spreadsheet for total dollar amount. I already got the miles figured out....

I am wondering how to sum up the amounts below containing $ only. Is this possible? Or would it be possible to add up all of the values in column 1 excluding cells that have the word "miles" in column 2.

Any assistance is appreciated!
Cheers

amountcategory
200​
total miles
50​
miles​
total $ from amount column 1??????? formula???total $
50​
miles​
50​
miles​
$ 10.00
meal​
$ 20.00
supplies​
$ 30.00
car​
$ 100.00
travel​
50​
miles​
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi,

Use SUMIF:

Book3.xlsx
ABCDE
1amountcategory200total miles
250miles160total $
350miles
450miles
5$10.00meal
6$20.00supplies
7$30.00car
8$100.00travel
950miles
Sheet1024
Cell Formulas
RangeFormula
D2D2=SUMIF(B2:B9,"<>miles",A2:A9)
 
Upvote 0
Welcome to the MrExcel board!

Assuming those values with $ signs are actually numbers, formatted as currency then you could use either of the methods you mentioned.

22 02 27.xlsm
ABCDE
1amountcategory200total miles
250miles160total $
350miles160
450miles
5$10.00meal
6$20.00supplies
7$30.00car
8$100.00travel
950miles
Sums
Cell Formulas
RangeFormula
D1D1=SUMIF(B2:B9,"miles",A2:A9)
D2D2=SUMIF(B2:B9,"<>miles",A2:A9)
D3D3=SUM(A2:A9)-D1


If the "$" values are text (looks a bit like they might be since they are left-aligned, then try

22 02 27.xlsm
ABCDE
1amountcategory200total miles
250miles160total $
350miles
450miles
5$10.00meal
6$20.00supplies
7$30.00car
8$100.00travel
950miles
Sums (2)
Cell Formulas
RangeFormula
D1D1=SUMIF(B2:B9,"miles",A2:A9)
D2D2=SUMPRODUCT(--(LEFT(A2:A9,1)="$"),--SUBSTITUTE(A2:A9,"$",""))
 
Upvote 0
Hi,

Use SUMIF:

Book3.xlsx
ABCDE
1amountcategory200total miles
250miles160total $
350miles
450miles
5$10.00meal
6$20.00supplies
7$30.00car
8$100.00travel
950miles
Sheet1024
Cell Formulas
RangeFormula
D2D2=SUMIF(B2:B9,"<>miles",A2:A9)
Thanks much sir!
Cheers
 
Upvote 0
Welcome to the MrExcel board!

Assuming those values with $ signs are actually numbers, formatted as currency then you could use either of the methods you mentioned.

22 02 27.xlsm
ABCDE
1amountcategory200total miles
250miles160total $
350miles160
450miles
5$10.00meal
6$20.00supplies
7$30.00car
8$100.00travel
950miles
Sums
Cell Formulas
RangeFormula
D1D1=SUMIF(B2:B9,"miles",A2:A9)
D2D2=SUMIF(B2:B9,"<>miles",A2:A9)
D3D3=SUM(A2:A9)-D1


If the "$" values are text (looks a bit like they might be since they are left-aligned, then try

22 02 27.xlsm
ABCDE
1amountcategory200total miles
250miles160total $
350miles
450miles
5$10.00meal
6$20.00supplies
7$30.00car
8$100.00travel
950miles
Sums (2)
Cell Formulas
RangeFormula
D1D1=SUMIF(B2:B9,"miles",A2:A9)
D2D2=SUMPRODUCT(--(LEFT(A2:A9,1)="$"),--SUBSTITUTE(A2:A9,"$",""))
Thank you very much, I appreciate it!
Cheers!
 
Upvote 0
You're welcome, thanks for the feedback.

@Peter_SSs when I copied and pasted OP's table into Excel, it turned opposite, the "miles" #s were Text, and the $# were Real numbers. Might have something to do with copying on the forum?
 
Upvote 0
Might have something to do with copying on the forum?
I don't think we can read much into it when the data is posted directly in a grid like that. I should have realised that when I mentioned the left-aligned values as a simple grid like that will always left-align anything with text characters. When I copy/pasted from the post all column A turned up as numerical in my sheet.
 
Upvote 0

Forum statistics

Threads
1,214,424
Messages
6,119,401
Members
448,893
Latest member
AtariBaby

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