#1   Report Post  
Posted to microsoft.public.excel.misc
JP JP is offline
external usenet poster
 
Posts: 103
Default Sumif

How can I add numbers in a row that contain a specific letter? For example,
How can I add 3H to 4H. I just want it to add the numbers containing the
letter H.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Sumif

Contains means ends with????

=SUM(IF(RIGHT(A1:A3,1)="h",--LEFT(A1:A3,LEN(A1:A3)-1)))
or maybe:
=SUM(IF(RIGHT(A1:A3,1)="h",--LEFT(A1:A3,LEN(A1:A3)-1)))&"H"

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can't use the whole column.



JP wrote:

How can I add numbers in a row that contain a specific letter? For example,
How can I add 3H to 4H. I just want it to add the numbers containing the
letter H.

Thanks


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 510
Default Sumif

Hi JP,

If your data is located in range A1:A12 :

=SUMPRODUCT(LEFT(A1:A12,1)*(RIGHT(A1:A12,1)="H"))

HTH
Cheers
Carim

  #4   Report Post  
Posted to microsoft.public.excel.misc
JP JP is offline
external usenet poster
 
Posts: 103
Default Sumif

This looks like what I am looking to do. However, when I put the function in
I am getting an error.

"Carim" wrote:

Hi JP,

If your data is located in range A1:A12 :

=SUMPRODUCT(LEFT(A1:A12,1)*(RIGHT(A1:A12,1)="H"))

HTH
Cheers
Carim


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 510
Default Sumif

Hi JP,

Give a try to following :

=SUMPRODUCT(--Value(LEFT(A1:A12,1))*--(RIGHT(A1:A12,1)="H"))

HTH
Cheers
Carim

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 use SUMIF to return sums between two values located in cells ScottBerger Excel Worksheet Functions 2 April 23rd 23 09:05 PM
Sumif of Sumif perhaps? Fred Excel Discussion (Misc queries) 2 March 29th 06 05:39 PM
SUMIF Ferg Excel Worksheet Functions 3 February 28th 06 03:37 AM
Embedding a Sumif in a sumif C.Pflugrath Excel Worksheet Functions 5 August 31st 05 07:31 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 07:54 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"