Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Help with finding numbers within text and summing

I have a row of text data that has numbers within brackets, like this [20].

Cells A1:G1 have a combination of numbers and bracketed numbers. Cell J1
has the formula Sum(A1:G1), it adds only the numbers and ignores the text
cells. I want Cell K1 to Sum just the values within the brackets in the same
range.

Can anyone help with this?
Can it be done with formula or will it require VBA Function?

Any help is appreciated
wallymeister
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,069
Default Help with finding numbers within text and summing

Try

=SUM(IF(LEN(A1:I1)=0,0,VALUE(SUBSTITUTE(SUBSTITUTE (A1:I1,"[",""),"]",""))))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
and not just Enter. If you do it correctly then Excel will put curly brackets
around the formula {}. You can't type these yourself. If you edit the formula
you must enter it again with CTRL+Shift+Enter.

Hope this helps,

Hutch

"wallymeister" wrote:

I have a row of text data that has numbers within brackets, like this [20].

Cells A1:G1 have a combination of numbers and bracketed numbers. Cell J1
has the formula Sum(A1:G1), it adds only the numbers and ignores the text
cells. I want Cell K1 to Sum just the values within the brackets in the same
range.

Can anyone help with this?
Can it be done with formula or will it require VBA Function?

Any help is appreciated
wallymeister

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Help with finding numbers within text and summing

Works great Tom,
Thanks so much.
wallymeister

"Tom Hutchins" wrote:

Try

=SUM(IF(LEN(A1:I1)=0,0,VALUE(SUBSTITUTE(SUBSTITUTE (A1:I1,"[",""),"]",""))))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
and not just Enter. If you do it correctly then Excel will put curly brackets
around the formula {}. You can't type these yourself. If you edit the formula
you must enter it again with CTRL+Shift+Enter.

Hope this helps,

Hutch

"wallymeister" wrote:

I have a row of text data that has numbers within brackets, like this [20].

Cells A1:G1 have a combination of numbers and bracketed numbers. Cell J1
has the formula Sum(A1:G1), it adds only the numbers and ignores the text
cells. I want Cell K1 to Sum just the values within the brackets in the same
range.

Can anyone help with this?
Can it be done with formula or will it require VBA Function?

Any help is appreciated
wallymeister

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
Summing Numbers and Text in same cell Andrewba Excel Discussion (Misc queries) 3 August 8th 08 03:57 PM
Help with summing numbers in cells that also contain text Michael Slater New Users to Excel 6 September 1st 07 05:38 AM
summing cells with text and numbers val Excel Worksheet Functions 1 August 2nd 06 03:26 AM
Summing cells that contain numbers and text Mango Excel Discussion (Misc queries) 10 May 13th 06 06:18 PM
CONDITIONAL FORMATING FINDING TEXT CONTAINING SPECIFIC NUMBERS Twiggy Excel Worksheet Functions 4 April 12th 06 09:13 AM


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