SUMIFS and looking at the left 2 characters or using a wildcard only return "0"

JDUNNAGAN

New Member
Joined
Dec 10, 2014
Messages
13
Hello all,

I am working on creating an executive dashboard. I need to sum the total spend for all budget codes by department and company. Unfortunately the department does not come through into the report but the budget codes does. There are at a minimum 20 budget codes per department. So I didn't want to try and build in every budget code since these will and do change. So I have two options based on my skill level that I could see. I can look at the first two characters of the budget code since that identifies the department. Or instead of looking at the first two characters I could use a wild card to get this thing working. Both of the formulas I am using only return a 0, which would be okay if there were no dollars matching the criteria but there are.

The 2 formulas I have been using.
=IF(LEFT('BILL DETAIL BY ACCOUNT YTD'!Z:Z,2)="25",SUMIFS('BILL DETAIL BY ACCOUNT YTD'!P:P,'BILL DETAIL BY ACCOUNT YTD'!W:W,"1"),"0")
=SUMIFS('BILL DETAIL BY ACCOUNT YTD'!P:P,'BILL DETAIL BY ACCOUNT YTD'!W:W,"1",'BILL DETAIL BY ACCOUNT YTD'!Z:Z,"="&"25*")

SIDE NOTE: I tried the formula within 1 worksheet instead of referenceing back to another worksheet within the formula and the formula worked. Now I'm really confused!!

Any help would be really appreciated.

Regards,
JD
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Try...

=SUMPRODUCT('BILL DETAIL BY ACCOUNT YTD'!P:P,--('BILL DETAIL BY ACCOUNT YTD'!W:W=1),--(LEFT('BILL DETAIL BY ACCOUNT YTD'!Z:Z,2)="25"))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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