Excel 2010 columns contain more than one number, need to sum all numbers within the column from multiple rows - excel

Need to SUM Excel columns where 1 row has several numbers within one column
Column B
Row1 68
136
68
Row2 1394
931
33
33
Row3 33
420
350
250
SUM B1:B3 only SUMs first number in cell ?? Help please.

I see no straightforward way to accomplish this.
However, you may flatten the cells into individual values.
Parallel to each cell, issue the formula
=SUBSTITUTE(A1, CHAR(10), ",")
This will make each cell comma separated. Your row one will become
68,136,68
You may then employ text to columns under the Data ribbon using the comma delimiter to give each number its own cell.
Thereafter you may rearrange the numbers and issue your SUM.

1] In C1 and copied down to suit:
="="&SUBSTITUTE(B1,CHAR(10),"+")
2] Copy ColumnC and Paste Special..., Values over the top, Replace All = with =.

Related

How can I delete all the rows where the value of columnA is equal to the value of columnB in excel?

How can I delete all the rows where the value of columnA is equal to the value of columnB in excel? I found some articles but they are all talking about deleting rows with some conditions for one row (then i can use filter in excel to get the rows). But how can I filter rows where the condition needs values from two columns? thanks.
like if i have
Row columnA columnB
1 10 10
2 20 20
3 30 40
4 50 70
then I want to keep row 3 and row4 and delete row 1 and row2 because they have the same value for columnA and columnB
OPTION 1
Something like this in an adjacent column?
=FILTER(A:B,A:A<>B:B,"")
It will reproduce column A without the duplicates.
OPTION 2
If you are looking for a way to quickly distinguish where the rows match and do not match (based on your comment) I would suggest a conditional format using the following:
=$A1<>$B1
OPTION 3
Or utilize the formula in cell C1:
=IF(A:A<>B:B,"Not Equal","")

Excel splitting one row into separate rows of a fixed number of colums

Here is a sample of the data I have in one row in an excel file. I would like to split it into multiple rows after every seven columns
15-Feb 20 783 175 105 $180 $973 15-Mar 31 900 58 145 $106 $140
to
15-Feb 20 783 175 105 $180 $973
15-Mar 31 900 58 145 $106 $140
You can use this formula:
=INDEX($1:$1,INT(COLUMN()+(ROWS(A$5:A5)-1)*7))
drag/copy this formula across till row 7 and down as required.
Issue with this formula is it will return 0 if cell is blank.
So alternatively, you can check for cell blank condition and write formula as:
=IF(ISBLANK(INDEX($1:$1,INT(COLUMN()+(ROWS(A$5:A5)-1)*7))),"",INDEX($1:$1,INT(COLUMN()+(ROWS(A$5:A5)-1)*7)))
If you have a well defined and deterministic way to split the two halves (for instance, columns "A" to "D" is the first half, while columns "E" to "H" is the second), you can enter a formula in a different sheet like (this is pseudo-code; you will need to verify the syntax):
Cell "A1" of the new sheet: ='Other_Sheet'!A(round(row()/2)+1)
Cell "A2" of the new sheet: ='Other_Sheet'!E(round(row()/2)+1)
The indirect reference is made such that it will go to the next row in the source sheet every two rows in the new sheet.

Assigning the same value to different cells according to the rank of a matching cell's group

I have an Excel sheet that has values repeating in different rows of the same column (Obtain Marks). In RANKS column I want a grade assigned.
My problem is assigning the same rank to cells having the same Obtain Marks values.
How do I assign the same rank to the same Obtained Marks using an Excel formula?
Obtain Marks RANKS
212 1
212 1
212 1
211 2
210 3
209 4
209 4
Assuming Obtain Marks is in A1 and is sorted in order, if you want grouped by rank then I suggest in B2 and copied down to suit:
=RANK(A2,A$2:A$7,)
If you post includes under RANK the desired output then I suggest instead 1 in B2 and in B3 and copied down to suit:
=IF(A2=A3,B2,B2+1)
Either way each group should have a distinct value.
You can derive a pseudo-RANK.UNIQUE formula by modifying an old standard method of a SUMPRODUCT-style COUNT.UNIQUE formula.
        
The formula in B2 is,
=SUMPRODUCT((A$2:A$8>=A2)/COUNTIF(A$2:A$8, A$2:A$8&""))
Fill down as necessary.

Excel Function to sum values from table based on a comma separated list

I am trying to find a function that will look at a table and sum all the values where the string appears in my comma separated list. I can get sumproduct to work if my list is separated into different cells, but I need the list to be in one cell. Here is what I'm looking for:
List in Cell A1: 2000,2100,2300
Table: A10:B16
A B
2000 20
2100 25
2200 32
2300 65
2400 72
2500 12
2600 2
I'm looking for a result of: 110
Any help would be appreciated.
Thanks!
I am assuming that you can use another column but not for your list?
If so you can use the formula below in column C
=IF(ISERROR(FIND(A2,$A$1,1))=FALSE,TRUE,FALSE) with A2 being the 1st cell in which the data is contained.
This is searching through your comma separated list and evaluating against the data in column B whether it exists in the list, if so then returns true if not false.
Now you can use the SUMIF function to return those matching true in your new column C.
=SUMIF(C2:C8,TRUE,B2:B8)
If having the evaluation column C is a problem for other users you could always hide it

Sum the values of if statements on multiple rows? (Excel)

Say I have a spreadsheet which looks like this:
A B C
1 In Actual Predicted
2 Thing One 300
3 Thing Two 564
4 Thing Three 256 1065
I want to be able to get a sum of the "predicted" column which incorporates values from the "actual" column if the "predicted" value is empty.
I.e. in this case, the value would be 300 + 564 + 1065 = 1929.
I know that I can achieve this for any individual row like so:
IF(C2="",B2,C2)
How do I get a sum of these "if" statements for each individual row?
Thanks.
That can be done with Sumifs() and no helper columns
=SUMIFS(B:B,C:C,"")+SUM(C:C)
Cell D2 = IF(C2="",B2,C2)
Cell D3 = IF(C3="",B3,C3)
...drag / copy to all relevant D cells...
Cell E1 = Sum(D:D)

Resources