Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel Data Validation/Lookup function does function correcty | Excel Worksheet Functions | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions |