I am trying to seperate a field into two by finding the values that are in the left of an asterisk and then what's on the right.
For example
Cell C1 is 0A*33 then C2 should be 0A and C3 should be 33.
I have the following formulas in cells C2 and C3:
=LEFT(C1,SEARCH("~*",C1,1)-1)
=RIGHT(C1,LEN(A3)-SEARCH("~*",C1,1))
These formulas work great as long as there is a asterisk in the cell, if not it results in a #VALUE! error.
I have even tried (For the left side) =LEFT(C1,IF(ISERROR(SEARCH("~*",C1,1)-1),C1,SEARCH("~*",C1,1)-1)) with the same outcome.
If the cell does not have an asterisk it must return the whole value in C2 and nothing in cell C3.
Have you tried:
In C2:
=IF(ISERROR(FIND("*",C1)),C1,LEFT(C1,FIND("*",C1)-1))
In C3:
=IF(ISERROR(FIND("*",C1)),"",RIGHT(C1,LEN(C1)-FIND("*",C1)))
You could use the same idea with SEARCH, but FIND works fine in this case:
In C2:
=IF(ISERROR(SEARCH("~*",C1,1)),C1,LEFT(C1,SEARCH("~*",C1,1)-1))
In C3:
=IF(ISERROR(SEARCH("~*",C1,1)),"",RIGHT(C1,LEN(C1)-SEARCH("~*",C1,1)))
=LEFT(C1,FIND("*",C1&"*")-1)
=MID(C1,FIND("*",C1&"*")+1,255)
Related
Hello I need to make a sumproduct with general conditions.
The correct values is shown in cell B6, B7 and B8
In cell B6 I have this formula =A1*A2+B1*B2+C1*C2 to understand what is the result that I expected.
In B7 is =D1*D2+E1*E2 and so on...
I've tried with this formula =SUMPRODUCT(A3:G3=A6,A1:G1,A2:G2) in cell B6 but the result is 0.
Use =SUMPRODUCT(1*(A3:G3=A6),A1:G1,A2:G2) in cell B6.
Better still use =SUMPRODUCT(1*(A$3:G$3=A6),A$1:G$1,A$2:G$2)
and you will be able to copy the formula from B6 to B7:B8 and it will behave as you want.
From this page, I learned that "--" can transform True and False values into 1's and 0's.
That's probably why you are getting 0, the formula you use adds boolean values to numerical values.
So the formula you are looking for in cell B6 is =SUMPRODUCT(--(A3:G3=A6),A1:G1,A2:G2).
Tested on Excel 2010, it worked.
My excel image:
At E6 cell, I used this formula:
=countifs(Example1!$L$19:$L$1000;$B$6;Exampale1!$M$19:$M$1000;$C$6)
And at F6 cell, i used this formula with C8 cell contains the sheetname that I want to refer:
=countifs('INDIRECT(C8)'!$L$19:$L$1000;$B$6;'INDIRECT(C8)'!$M$19:$M$1000;$C$6)
why are there 2 different returned results?
As expected, I want F6 will return as E6.
I tried to search but nothing can resolve.
That's not how indirect works.
Replace the formula in F6 as follow.
=COUNTIFS(INDIRECT("'"&C8&"'!"&"$L$19:$L$1000"),$B$6,INDIRECT("'"&C8&"'!"&"$M$19:$M$1000"),$C$6)
I have a number in cell B2 and I want to make a sub this number with each number in the column C.
The results will be presented in a row (and I want to use the cross in the right corner of the cell to autofill).
Let me explain you what I want to show in each cell:
E2: $B$2-C5
F2: $B$2-C6
G2: $B$2-C7
In order not to write it manually in each cell, how can I change it (autocomplete C5, C6, C7) with the usage of the cross?
I tried to use the dollar like $B$2-$C5 and then drag the cross but it fills all the cells with the C5 value and not C6, C7 etc
In E2 enter:
=$B$2-INDEX($C:$C,COLUMNS($A:E))
and copy across:
I have some value in cell a1 and these formulas in other cells:
in cell a2: =$a$1+1
in cell a3: =$a$1+2
in cell a4: =$a$1+3
when I select cells a2:a4 and drag down until cell a7 in order to fill the formulas with continuation of the same logic, I get same formulas:
in cell a5: =$a$1+1
in cell a6: =$a$1+2
in cell a7: =$a$1+3
Instead of:
in cell a5: =$a$1+4
in cell a6: =$a$1+5
in cell a7: =$a$1+6
Is there a way to achieve this result by dragging?
Try this in A2:
=$A$1+Row(1:1)
Now as you drag down the Row(1:1) will change to Row(2:2),Row(3:3) and so forth. Thus adding the needed number.
Your sample may have been over-simplified but this should work in A2.
=$A1+1
Dragged down it will result in,
=$A2+1
=$A3+1
(etc)
You can do this without the formulae as well. Since what you want is basically an increasing series by 1, under your cell A1; enter your value in A1 (e.g. 2.3618), and hold the Ctrl button on your PC (not sure about Mac), and drag the bottom right corner of the cell A1 downwards as far as you want. (Also known as Fill Series)
PS: This doesn't work if A1 has irrational numbers (like sqrt(2), pi(), etc.)
I'm trying to write a simple formula to check whether either 1 or both cells are blank and, if so, leave the resulting cell blank. I want the resulting cell to only display a calculation if both cells are filled in.
I've got this do far though it doesn't work as I wanted: =IF(OR(C4<>"",B4<>""),A4-C4,"")
b4 has a date and c4 has a numeric value (4). the formulate is in d4. I want to check if b4 or c4 are blank and, if so, leave d4 blank too, else take c4 from a4 (14 as of now).
It should work:
=IF(ISBLANK(C4);"";IF(ISBLANK(D4);"";A4-C4))
It checks if C4 is a blank cell, if not then checks if D4 is blank, if not then does the math.
I recommend using ISBLANK to check for blank cells.
Formula for your D4:
=IF(OR(ISBLANK(B4), ISBLANK(C4)),,A4-C4)
Just try this formula
=IF(AND(C4<>"",B4<>""),A4-C4,"")
Also, I used =IF(A2&B2="",TRUE VALUE, FALSE VALUE) which worked great