Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default sum numbers which contain characters

in column A (A1:A11)
12
c8
22
c1
54
c19
c6
25
c3
c7
55
how to get the sum only for those number which begins with "c"?
many thanks for any help

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,572
Default sum numbers which contain characters

Try this:

=SUMPRODUCT((ISTEXT(A1:A11)*(RIGHT(A1:A11,LEN(A1:A 11)-1))))
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"excelFan" wrote in message
...
in column A (A1:A11)
12
c8
22
c1
54
c19
c6
25
c3
c7
55
how to get the sum only for those number which begins with "c"?
many thanks for any help


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default sum numbers which contain characters

If you meant 'count' how many values begin with letter c
=SUMPRODUCT(--(LEFT(A1:A11)="c"))
Answer 6

If you really do want to 'sum' the numbers following the letter c
=SUMPRODUCT(--(LEFT(A1:A11)="c"), --MID(A1:A11,2,256))
Answer 44

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"excelFan" wrote in message
...
in column A (A1:A11)
12
c8
22
c1
54
c19
c6
25
c3
c7
55
how to get the sum only for those number which begins with "c"?
many thanks for any help


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default sum numbers which contain characters

Please note that this is an array formula. Within the cell in edit mode (F2)
paste this formula and press Ctrl+Shift+Enter to apply this formula. If
successful in 'Formula Bar' you can notice the curly braces at both ends like
"{=<formula}"

=SUM(--IF(LEFT(A1:A11,1)="c",MID(A1:A11,2,10)))



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


"excelFan" wrote:

in column A (A1:A11)
12
c8
22
c1
54
c19
c6
25
c3
c7
55
how to get the sum only for those number which begins with "c"?
many thanks for any help

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default sum numbers which contain characters



"Bernard Liengme" wrote:

If you meant 'count' how many values begin with letter c
=SUMPRODUCT(--(LEFT(A1:A11)="c"))
Answer 6

If you really do want to 'sum' the numbers following the letter c
=SUMPRODUCT(--(LEFT(A1:A11)="c"), --MID(A1:A11,2,256))
Answer 44

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"excelFan" wrote in message
...
in column A (A1:A11)
12
c8
22
c1
54
c19
c6
25
c3
c7
55
how to get the sum only for those number which begins with "c"?
many thanks for any help


Thanks Barnard

your formula =SUMPRODUCT(--(LEFT(A1:A11)="c"), --MID(A1:A11,2,256))
works fine for the first time, but when editing any cell value returns an
error (#VALUE, and in case there is an empty cell in the range gives also an
error.Please help for solution.
regards


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default sum numbers which contain characters

Not sure I fully understand your problem
I agree that a blank cell will cause havoc
This solves that problem
=SUMPRODUCT(--(LEFT(A1:A11)="c"),--(MID(A1:A11,2,256)&0))/10

What other edits cause a problem?
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"excelFan" wrote in message
...


"Bernard Liengme" wrote:

If you meant 'count' how many values begin with letter c
=SUMPRODUCT(--(LEFT(A1:A11)="c"))
Answer 6

If you really do want to 'sum' the numbers following the letter c
=SUMPRODUCT(--(LEFT(A1:A11)="c"), --MID(A1:A11,2,256))
Answer 44

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"excelFan" wrote in message
...
in column A (A1:A11)
12
c8
22
c1
54
c19
c6
25
c3
c7
55
how to get the sum only for those number which begins with "c"?
many thanks for any help


Thanks Barnard

your formula =SUMPRODUCT(--(LEFT(A1:A11)="c"), --MID(A1:A11,2,256))
works fine for the first time, but when editing any cell value returns an
error (#VALUE, and in case there is an empty cell in the range gives also
an
error.Please help for solution.
regards



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
Adding numbers or characters to existing numbers Jannie Excel Worksheet Functions 9 February 20th 07 03:08 PM
numbers to characters George Applegate Excel Worksheet Functions 1 July 22nd 06 03:37 PM
Deleting characters that are not numbers jermsalerms Excel Discussion (Misc queries) 4 January 12th 06 08:06 PM
characters around numbers ellie Excel Discussion (Misc queries) 3 December 28th 05 09:14 PM
Converting characters to numbers Robbie aka Zoqaeski :p Excel Worksheet Functions 3 February 2nd 05 06:12 AM


All times are GMT +1. The time now is 11:35 AM.

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"