Is there a formula that will SUM all values of a single cell.
For example:
If I have a cell that contains more than one value, say 100 and 200 in same cell. Is there a formula to SUM these 2 values in another cell?
Thanks in advance
Is there a formula that will SUM all values of a single cell.
For example:
If I have a cell that contains more than one value, say 100 and 200 in same cell. Is there a formula to SUM these 2 values in another cell?
Thanks in advance
You did not tell us what the separator is.
This formula:
=SUMPRODUCT(--MID(SUBSTITUTE(A1,CHAR(10),REPT(" ",99)),99*(ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE(A1,CHAR(10),""))+1))-1)+1,99))
is set up for CHAR(10) - new line - separators.
Glenn
None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.
Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh
It would be better to split the cells so that one value is contained in each cell.
Or if it is a space....
=SUMPRODUCT(--MID(SUBSTITUTE(A1," ",REPT(" ",99)),99*(ROW(INDIRECT("1:"&LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+1))-1)+1,99))
I am using a PDF converted to Excel file as a feed sheet so I can just copy and paste the sheet in once converted, so can't really split the cell unfortunately.
Text to columns deliminated can do that
"1,217
UK & Ireland
663
Web UK & IE"
The cell I want to sum contains the above.
Now that is a totally different question, isn't it. In Post 1 you never mentioned that there was text in the cells as well.
You will need VBA for that.
Last edited by Glenn Kennedy; 01-29-2019 at 07:14 AM.
Try this:
How to install your new codePlease Login or Register to view this content.
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Press Alt+F11 to open the Visual Basic Editor
Choose Insert > Module
Edit > Paste the macro into the module that appeared
Close the VBEditor
Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
=SUMnUMBERS(A1)
I basically want to be able to paste my PDF to excel sheet into a back sheet so the data pulls through to the front sheet automatically but SUMS the multiple values from one cell from the back sheet into 1 cell on the front sheet.
Does this make sense?
Glenn has the reins I opt out.
Good luck
Text at A1
Please try at B1 and press Ctrl+Shift+Enter
=SUM(IFERROR(--MID(SUBSTITUTE(SUBSTITUTE(A1,CHAR(10)," ")," ",REPT(" ",100)),ROW(INDIRECT("1:20"))*100-99,100),))
Very nice, Bo. I can't add rep for you 'cos of forum restrictions...
I have attached an example workbook.
I need the formula to SUM the 2 numbers in cell A29 on Front Sheet and display the SUM in cell D3 on the back shet.
Thanks, Glenn
Congratulations on your promotion.
Sorry SUM of numbers in A29 back sheet need to pull through a a SUM on D3 front sheet.
Please try at D3 and press Ctrl+Shift+Enter
=SUM(IFERROR(--MID(SUBSTITUTE(SUBSTITUTE('Back (Feed) Sheet'!A29,CHAR(10)," ")," ",REPT(" ",100)),ROW(INDIRECT("1:20"))*100-99,100),))
or this press Ctrl+Shift+Enter and drag down
Formula:Please Login or Register to view this content.
Please download sheet from post#17 and see.
Thank Bo, you are a star
It should work if the delimiters of each number are space or char(10) (Alt+Enter).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks