Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Summing Numbers and Text in same cell | Excel Discussion (Misc queries) | |||
Help with summing numbers in cells that also contain text | New Users to Excel | |||
summing cells with text and numbers | Excel Worksheet Functions | |||
Summing cells that contain numbers and text | Excel Discussion (Misc queries) | |||
CONDITIONAL FORMATING FINDING TEXT CONTAINING SPECIFIC NUMBERS | Excel Worksheet Functions |