Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 132
Default Formula / Counting

I have the following range A1:G44 and the values in cells:

A2 = 4B
A5 = 8L
B2 = 1L
A10 = 1B
C10 = 0.5L

I need to sum the L's and the B's separately so that in this case there
would be a total of 5Bs and 9.5Ls.

Can this be accomplished and if so, how?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Formula / Counting

Try this array formula**:

=SUM(IF(ISNUMBER(SEARCH("B",A1:G44)),--SUBSTITUTE(A1:G44,"B","")))

For the Ls, just replace the "B" in the formula.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Anna" wrote in message
...
I have the following range A1:G44 and the values in cells:

A2 = 4B
A5 = 8L
B2 = 1L
A10 = 1B
C10 = 0.5L

I need to sum the L's and the B's separately so that in this case there
would be a total of 5Bs and 9.5Ls.

Can this be accomplished and if so, how?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Formula / Counting

=SUM(IF(RIGHT(A1:C10,1)="B",LEFT(A1:C10,LEN(A1:C10 )-1)+0))

ctrl+shift+enter, not just enter


"Anna" wrote:

I have the following range A1:G44 and the values in cells:

A2 = 4B
A5 = 8L
B2 = 1L
A10 = 1B
C10 = 0.5L

I need to sum the L's and the B's separately so that in this case there
would be a total of 5Bs and 9.5Ls.

Can this be accomplished and if so, how?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Formula / Counting

Try this ARRAY FORMULA (committed with Ctrl+Shift+Enter, instead of just Enter:

=SUM(IF(RIGHT(A1:G44,1)="L",--SUBSTITUTE(A1:G44,"L","")))
=SUM(IF(RIGHT(A1:G44,1)="B",--SUBSTITUTE(A1:G44,"B","")))

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Anna" wrote:

I have the following range A1:G44 and the values in cells:

A2 = 4B
A5 = 8L
B2 = 1L
A10 = 1B
C10 = 0.5L

I need to sum the L's and the B's separately so that in this case there
would be a total of 5Bs and 9.5Ls.

Can this be accomplished and if so, how?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 132
Default Formula / Counting

Yes. It works like a charm. Thank you everyone for your help.

"Ron Coderre" wrote:

Try this ARRAY FORMULA (committed with Ctrl+Shift+Enter, instead of just Enter:

=SUM(IF(RIGHT(A1:G44,1)="L",--SUBSTITUTE(A1:G44,"L","")))
=SUM(IF(RIGHT(A1:G44,1)="B",--SUBSTITUTE(A1:G44,"B","")))

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Anna" wrote:

I have the following range A1:G44 and the values in cells:

A2 = 4B
A5 = 8L
B2 = 1L
A10 = 1B
C10 = 0.5L

I need to sum the L's and the B's separately so that in this case there
would be a total of 5Bs and 9.5Ls.

Can this be accomplished and if so, how?



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default Formula / Counting

I'm glad I could help....thanks for letting me know.


***********
Regards,
Ron

XL2002, WinXP


"Anna" wrote:

Yes. It works like a charm. Thank you everyone for your help.

"Ron Coderre" wrote:

Try this ARRAY FORMULA (committed with Ctrl+Shift+Enter, instead of just Enter:

=SUM(IF(RIGHT(A1:G44,1)="L",--SUBSTITUTE(A1:G44,"L","")))
=SUM(IF(RIGHT(A1:G44,1)="B",--SUBSTITUTE(A1:G44,"B","")))

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Anna" wrote:

I have the following range A1:G44 and the values in cells:

A2 = 4B
A5 = 8L
B2 = 1L
A10 = 1B
C10 = 0.5L

I need to sum the L's and the B's separately so that in this case there
would be a total of 5Bs and 9.5Ls.

Can this be accomplished and if so, how?

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
Counting formula TMF in MN Excel Worksheet Functions 2 January 8th 07 06:50 PM
formula for counting TMF in MN Excel Worksheet Functions 7 October 31st 06 11:48 PM
formula on counting Michael A Excel Discussion (Misc queries) 2 January 6th 06 03:52 PM
Counting Formula Paul Excel Discussion (Misc queries) 1 October 26th 05 05:02 AM
Help with counting formula Ian Excel Discussion (Misc queries) 1 January 7th 05 10:25 AM


All times are GMT +1. The time now is 09:44 PM.

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

About Us

"It's about Microsoft Excel"