I am trying to clean some data with this format:
A1 B1 C1
"0,1,0,E,1" "0,0,0,E" "0,1,1,1,2,E"
To obtain the information, I will need to sum up each cell individually, and then calculate the sum over a row.
So far, I have replaced all of the "E"s (for empty) with no data, which removed the E's, and I have replaced all of the commas with "+" signs to add the numbers in the cell. To run the formula of each cell, I will need to now place an "=" in front of each text string, however, if I copy it in with something like "="="&A1" the formula will not run because excel is reading the = as a letter or symbol and not an operator. Do you know of a way to fix this problem?
Thank you so much!
I think this will work for your version ...
=SUM(FILTERXML("<d><c>" & SUBSTITUTE(A1,",","</c><c>") & "</c></d>","//c"))
That's applied like below ...
... there's always someone smarter than me but that seems to work.
It’s not an in place replacement but it keeps your source data intact and provides a nice reconciliation point.
Using a separate sheet for each column of values, given data in cell A1 of
0,0,0,1,0,1,1,E,1,0
In C1, enter the formula
=IFERROR(MID(SUBSTITUTE(SUBSTITUTE($E$14,",",""),"E",""),COLUMN()-2,1)*1, "")
and drag the fill handle to to the right for as many cells as the longest number of data points you have.
Enter your SUM()formula in B1 (you can use the shortcut ALT + =).
Have you tried something like this, please refer the image, where its showing as per your required output, three alternative formulas
1.) Formula used in cell B2
=SUMPRODUCT(IFERROR(--MID($A2,ROW(INDIRECT("1:"&LEN($A2))),1),0))
2.) Formula used in cell D2
=SUMPRODUCT(IFERROR(--MID($C2,SEQUENCE(LEN($C2)),1),0))
The 2nd formula is applicable to Excel 2021 & O365 Users only
3.) Formula used in cell F2
=SUM(IFERROR(--MID($E2,ROW($1:$1000),1),0))
This is an array formula, so requires to press CTRL SHIFT ENTER !
Here is an update, the last formulas, which i have shared, shall work only when the digits are less than 10, however the present formula, shall work for all number of digits,
Formula used in cell B17
=SUMPRODUCT(IFERROR(--MID(SUBSTITUTE($A17,",",REPT(" ",100)),COLUMN(A1:Z1)*99-98,100),0))
Please adjust your range accordingly as per your data.
I have a spreadsheet which I want to: E2=C3-C2, then E3=C5-C4, E4=C7-C6 etc for lots of cells:
So I am looking for a formula which I can drag down which minuses values in pairs rather than consecutively.
I tried SUM(OFFSET) but only added values, not minus.
Any help greatly appreciated!
If you must use a formula in E2, then try:
=INDEX(C:C,ROW()*2-1)-INDEX(C:C,ROW()*2-2)
Your idea of using OFFSET can be made to work. In E2 put
=OFFSET($C$1,2*ROW()-2,0)-OFFSET($C$1,2*ROW()-3,0)
and copy down.
I have a column in excel with the below values
Now I want to split that column into 4 columns with the values as below.
Am trying with Excel formulas using nested if with AND, OR and substitute, but not able to achieve it. Any suggestions/help on how can I get this ?
Thanks in Advance
One solution to Your problem, if not this might move you to the correct answer, could be
=IF(ISNUMBER(SEARCH(C$1,$A2)),IFERROR(MID($A2,FIND(C$1&" $ ",$A2)+6,LEN(C$1)),MID($A2,FIND(C$1&" $",$A2)+5,LEN(C$1))),0)
Im assuming that your Column 1 starts in A1 and your first input is in A2 further more im assuming headers ABC, DEF... are put in from C1. So putting this formula in C2 you can drag this across and down.
The IFERROR handles the possibility that there is a space behind the $
I'm looking for a solution to automatically distribute the value of a cell (C3 till C10) based on the number of months (B7 till B10).
Anyone who can help me out with this formula?
First, you can make a helper row as showed in image attached starting with number 1.
Then apply below formula to cell(E5) and drag across the range.
Formula: "=IF($B5>=E$3,$C5/$B5,0)"
Related Image
Thanks
Abhinav
Type the following formula into cell E7:
= IF(COLUMN()-COLUMN($E7)+1<=$B7,$C7/$B7,0)
Then drag this cell over and then down as far as you need it.
For second part, to calculate amount of months you can add formula in cell("C4") as:
=MONTH(DATEVALUE(C3&"1"))-MONTH(C2)+1
I did try to enter in a cell formula:
=SUM(ADDRESS(ROW(),COLUMN()+1):ADDRESS(ROW(),COLUMN()+2))
Intention is summing next 2 cell in the same row.
But the spreadsheet complains with error on it!
Used functions: ADDRESS(ROW(),COLUMN()+1). Work fine but together - not!
In B7 cell:
(I need to write a generic formula that is independent from location and calculates the sum of the next tho cell in the same row.
I am not interested in specific addresses or in a way to copy any specifically written formula across a spreadsheet.
I need a formula that works independently from a location!
Is it possible in Excel at all?)
Thanks.
ADDRESS returns address as a string. You cannot SUM it because SUM(A2:A3) is very different from SUM("A2:A3").
You could look into SUM(INDIRECT("A2:A3")), but you should not, for the mere reason that Excel's formulas are already relative unless made absolute.
If you want to sum two cells to the right of B7, enter =SUM(C7:D7) to B7. The formula will change if you copy it to another cell.
If you meant to enter the formula with a macro, then use the R1C1 notation and enter =SUM(RC[1]:RC[2]).
sorry im dont speak english , but a have what you need
= SUM(INDIRECT(CONCATENATE(ADDRESS(ROW();COLUMN()+1);":"; ADDRESS(ROW();COLUMN()+2))))
Regards