#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default SUMIF Function

Dear all

I have to add and subtract the values of some cells.So that's the case
In the first column i have the codes of account which have in the first part
4 numbers underscore and some other figures. (1000_A1, 1000_A2, 1050_A3,
2000_A4).

So based on the first four numbers i want to add those that have 000 and
subtract those that include 50 (eg lets say that the third character to be 5
and the fourth characted to be zero).

So i need to add 1000_a1 + 1000_a2 + 2000_a4
and sub tract the 1050_a3

I thouhg to use one sumif to add those include 000 and another one to sumif
with 50.The problem is that i do not know how to set up the if match in SUMIF.

Any suggestions?

Thanks in advance
Manos
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default SUMIF Function

Maybe one way:

=SUMPRODUCT(--(MID(A1:A4,2,3)="000")-(MID(A1:A4,3,2)="50"),LEFT(A1:A4,4)*1)

HTH,
Paul

--

"Manos" wrote in message
...
Dear all

I have to add and subtract the values of some cells.So that's the case
In the first column i have the codes of account which have in the first
part
4 numbers underscore and some other figures. (1000_A1, 1000_A2, 1050_A3,
2000_A4).

So based on the first four numbers i want to add those that have 000 and
subtract those that include 50 (eg lets say that the third character to be
5
and the fourth characted to be zero).

So i need to add 1000_a1 + 1000_a2 + 2000_a4
and sub tract the 1050_a3

I thouhg to use one sumif to add those include 000 and another one to
sumif
with 50.The problem is that i do not know how to set up the if match in
SUMIF.

Any suggestions?

Thanks in advance
Manos



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 50
Default SUMIF Function

Thank you very much



"Manos" wrote:

Dear all

I have to add and subtract the values of some cells.So that's the case
In the first column i have the codes of account which have in the first part
4 numbers underscore and some other figures. (1000_A1, 1000_A2, 1050_A3,
2000_A4).

So based on the first four numbers i want to add those that have 000 and
subtract those that include 50 (eg lets say that the third character to be 5
and the fourth characted to be zero).

So i need to add 1000_a1 + 1000_a2 + 2000_a4
and sub tract the 1050_a3

I thouhg to use one sumif to add those include 000 and another one to sumif
with 50.The problem is that i do not know how to set up the if match in SUMIF.

Any suggestions?

Thanks in advance
Manos

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
How to nest a left function within a sumif function? LisaK Excel Worksheet Functions 2 April 23rd 23 11:46 AM
Using the TODAY() function in a SUMIF function JPB Excel Worksheet Functions 4 July 27th 06 04:01 PM
How do I use the TODAY function with the SUMIF function? Lisa B. Excel Worksheet Functions 2 September 30th 05 08:51 PM
SUMIF Function Inside SUMPRODUCT Function Abdul Waheed Excel Worksheet Functions 17 September 19th 05 04:24 PM
SUMIF - Range name to used for the "sum_range" portion of a SUMIF function Oscar Excel Worksheet Functions 2 January 11th 05 11:01 PM


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

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

About Us

"It's about Microsoft Excel"