ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   sumproduct (https://www.excelbanter.com/excel-discussion-misc-queries/147288-re-sumproduct.html)

bj

sumproduct
 
in column A is numeric
=sumproduct(--(or(int(A1:A5*1e-7)=90,int(A1:A5*1e-7)=91)),--(mod(A1:A5,1e6)=80111),B1:B5)

if column A is text
=sumproduct(--(or(left(A1:A5,2)="90",left(A1:A5)="91")),--(right(A1:A5)="80111"),B1:b5)

"Farhad" wrote:

Hi,

My data is like below:

A B
1 900180111 50000
2 902180111 20000
3 911180111 15000
4 900180121 40000
5 911280121 150000

what i want to do is:

sum of column B which the code in the column A started with 90 or 91 and
ended with 80111 the answer suld be 35000

any help would be appriciated.

Farhad
--

Farhad Hodjat



All times are GMT +1. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com