sum if function

V

Vikkib

I have a cell (H12) with this data in it:
WP:WK52:3 :BEV01, the WK number changes each week. I need to add up the
amount BEV01 earns throughout the contract, the costs are in another column.
I have used this formula: -
=SUM(IF($H$5:$H$2475,Right(H12,"5"),$M$5:$M$2475)
Do I need to put in an IF function to specify BEV01 with the RIGHT function?
 
J

Jacob Skaria

Try the below *** array formula ***

=SUM(IF(RIGHT($H$5:$H$2475,5)="BEV01",$M$5:$M$2475))

If the length of the data in column H is always in the same format with 3
":" but ID not always 5 characters it is better to use the below formula

=SUM(IF(TRIM(RIGHT(SUBSTITUTE($H$5:$H$2475,":",REPT(CHAR(32),50)),50))="BEV01",$M$5:$M$2475))

If this post helps click Yes
 
D

Dave Peterson

If you're just checking for BEV01 as the final 5 characters:

=sumif($h$5:$H$2475,"*bev01",$m$5:$m$2475)
or
=sumif($h$5:$H$2475,"*"&"bev01",$m$5:$m$2475)
or
=sumif($h$5:$H$2475,"*"&right(h12,5),$m$5:$m$2475)
(if x99 held the long WP:WK52:3 :BEV01 string.)

=Sumif() is one of those nice functions that will use wildcards (the asterisk
represents any set of characters).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

cell data 3
sum formula not working excel 03 3
nno result if one cell empty 4
SumProduct Assistance Please 4
Variable row groupings 3
Formula to sum rows 5
lookup or match? 5
Hyperlink Match 4

Top