Forum

Notifications
Clear all

Use Sumifs with the Left function

8 Posts
4 Users
0 Reactions
287 Views
(@bluesman)
Posts: 4
Active Member
Topic starter
 

Hi,

My basic SUMIFS formula works fine until I try to introduce the LEFT function so I tried wrapping the SUMIFS formula in the SUM function hoping that would help but unfortunately it doesn't, any ideas as to how to use the two functions together?

=sum(SUMIFS(Statements[Paid out], Statements[Account], "Joint",left(Statements[Transaction type],6), "Direct",Statements[Date], ">="&XLOOKUP(MAXIFS(Statements[Date], Statements[Account], "Joint", left(Statements[Transaction type],6),"Direct") & "Joint",Statements[Date] & Statements[Account], Statements[Transaction type], [Date])))

Thanks,

David

 
Posted : 16/08/2024 2:58 pm
(@purfleet)
Posts: 412
Reputable Member
 

left makes the result text - try adding a zero to make the result of left a number

=Left(a1,6)+0

 
Posted : 17/08/2024 12:39 am
(@bluesman)
Posts: 4
Active Member
Topic starter
 

Thanks but this doesn't work either.

 
Posted : 17/08/2024 2:52 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi David,

Please supply your file so we can see what data the formula is using.  Really hard to debug it without this.

Also please state what result you are expecting.

Regards

Phil

 
Posted : 17/08/2024 7:19 am
(@bluesman)
Posts: 4
Active Member
Topic starter
 

I thought had added an upload but just done again - I've stripped the data back but the date element of the formula works well for picking up categorised items (column and referencing also deleted) where there are multiple inflows or outflows of the same category on the same day of the most recent month - the date element is needed but can be ignored for the purposes of the attached, the focus is really on combining SUMIFS and LEFT, thanks.

 
Posted : 17/08/2024 11:21 am
(@debaser)
Posts: 837
Member Moderator
 

You cannot use functions on the ranges in a SUMIFS formula as that would return an array, not a range, and the function will not accept anything other than a range. However you can use wildcards, so you'd simply use the range as normal and "Direct*" as the criterion.

 
Posted : 18/08/2024 10:08 am
(@bluesman)
Posts: 4
Active Member
Topic starter
 

Thank you, simples :).

 
Posted : 20/08/2024 3:08 am
(@debaser)
Posts: 837
Member Moderator
 

Glad we could help. 🙂

 
Posted : 20/08/2024 9:42 am
Share: