#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 258
Default Sumif condition

Good morning --

I want to create a sumif using the first character of a field. If the first
character is an asterisk, then I want to sum another column in the row:

A B
1 ABC 4.25
2 *ABC 5.25
3 DEF 6.25

The correct answer would be 5.25. It seems like I should be building a LEFT
function into a SUMIF function, but can't quite get all the way there.

TIA for any help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,420
Default Sumif condition

=SUMPRODUCT(--(LEFT(A1:A10,1)="*"),B1:B10)

--
__________________________________
HTH

Bob

"pdberger" wrote in message
...
Good morning --

I want to create a sumif using the first character of a field. If the
first
character is an asterisk, then I want to sum another column in the row:

A B
1 ABC 4.25
2 *ABC 5.25
3 DEF 6.25

The correct answer would be 5.25. It seems like I should be building a
LEFT
function into a SUMIF function, but can't quite get all the way there.

TIA for any help.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Sumif condition

Try this:

=SUMIF(A1:A10,"~**",B1:B10)

Or, if that's too cryptic:

=SUMPRODUCT(--(LEFT(A1:A10)="*"),B1:B10)

--
Biff
Microsoft Excel MVP


"pdberger" wrote in message
...
Good morning --

I want to create a sumif using the first character of a field. If the
first
character is an asterisk, then I want to sum another column in the row:

A B
1 ABC 4.25
2 *ABC 5.25
3 DEF 6.25

The correct answer would be 5.25. It seems like I should be building a
LEFT
function into a SUMIF function, but can't quite get all the way there.

TIA for any help.



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
SumIF for more than one condition kippers Excel Worksheet Functions 3 October 26th 07 12:13 PM
Sumif, having two condition ViestaWu Excel Worksheet Functions 2 June 7th 07 10:23 AM
sumif with or< condition Will Fleenor Excel Discussion (Misc queries) 8 April 27th 07 07:45 AM
sumif with or< condition Will Fleenor Excel Worksheet Functions 8 April 27th 07 07:45 AM
sumif on more than one condition steve alcock Links and Linking in Excel 4 May 13th 05 01:53 PM


All times are GMT +1. The time now is 12:45 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"