#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default sum if function

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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default sum if function

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,":",REP T(CHAR(32),50)),50))="BEV01",$M$5:$M$2475))

If this post helps click Yes
---------------
Jacob Skaria


"Vikkib" wrote:

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?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default sum if function

Hi,

I'd do it like this

=SUMPRODUCT((RIGHT(H5:H2475,5)="BEV01")*(M5:M2475) )

Mike

"Vikkib" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default sum if function

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).

Vikkib wrote:

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?


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel Data Validation/Lookup function does function correcty Kirkey Excel Worksheet Functions 2 May 25th 09 09:22 PM
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM


All times are GMT +1. The time now is 09:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"