I want to know how to identify a particular character in a column in Excel is used.
I am using this formula :
=IF((CODE(A1)=63),"YES","NO")
but only checks the first character and the second character and then not be checked.
Please guide me.
Try this:
={SUM(IF(ISERR(FIND(CHAR(63),A1:A999)),0,1))>0}
This is a matrix formula, enter without braces but terminate with Ctrl-Shift-Enter. Don't put this into column A.
Related
I'm looking for an excel formula to return the index of the first value in a large column such that ABS((COL)(ROW)-(COL)(ROW+2))< 0.1
Clearly, this is pretty easy to program in VBA by starting with the first row in the column and iterating through. However, I'm just looking for an excel formula in this case.
I think it will need to be something functionally like:
=INDEX($A$1:$A$100,MATCH(TRUE,($A$1:$A$100)-($A$3:$A$102)<.1,0))
This clearly won't return anything. I'm interested in how to do that subtraction part using excel formulas.
Thanks!
Just need to add the ABS and ARRAY ENTER the formula:
=INDEX($A$1:$A$100,MATCH(TRUE,ABS(($A$1:$A$100)-($A$3:$A$102))<.1,0))
Being an array formula it must be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode. If done correctly then Excel will put {} around the formula.
I have an array formula in a cell. This formula displays the line number of a cell at the condition that the cell contains "FAIL" (and displays the line numbers with a coma separator). I wanted to add another condition to this formula so I tried to use AND but it now doesn't work anymore and I don't know why.
The original IF that worked looks like that:
IF(Y23:Z6000="FAIL";ROW(Y23:Z6000);"")
And what I want to write is
IF(AND(Y23:Z6000="FAIL";NOT(ISBLANK(A23:A6000));ROW(Y23:Z6000);"")
I have also tried with A23:A6000<>"" but same outcome.
The whole formula is this one:
{=TEXTJOIN(",";TRUE;IF(AND(Y23:Z6000="FAIL";NOT(ISBLANK(A23:A6000)));ROW(Y23:Z6000);""))}
Can you please help me figure out what I did wrong? Thanks in advance.
Array formulas do not like AND or OR Either nest IFs or use * or + respectively:
=TEXTJOIN(",";TRUE;IF((Y23:Z6000="FAIL")*(NOT(ISBLANK(A23:A6000)));ROW(Y23:Z6000);""))
Array formulas require confirmation with Ctrl-Shift-Enter instead of Enter when exiting edit mode.
Suppose I have a row of cells that contain comma delimited strings like so:
I have figured out how to add the first character of each string using this formula:
=SUMPRODUCT(--(LEFT(C2:G2,SEARCH(",",C2:G2,1)-1)))
Now, I would like to extend the formula to the cell AA2, like so
=SUMPRODUCT(--(LEFT(C2:AA2,SEARCH(",",C2:AA2,1)-1)))
however, I cannot seem to get the it to ignore empty cells - it throws a #VALUE! error. I realize that I could simply update the formula each time I enter data in the subsequent cells, but that's not exactly efficient. I assume this throws an error because the SEARCH function returns a null value.
How might I get this to work?
You can try below modified formula:
=SUMPRODUCT(--(LEFT(C2:AA2&"0,",SEARCH(",",C2:AA2&"0,",1)-1)))
For right side you can use MID like below and check:
=SUMPRODUCT(--(MID(C2:AA2&".0",SEARCH(",",C2:AA2&",.0",1)+1,99)+0))
Your idea of searching for the comma is not needed if you only want to add the first character of each cell. Just grab the left-most single character.
Say we may have data from A1 to Z1 that may include some blank cells. Pick a cell and enter the array formula:
=SUM(IF(LEN(A1:Z1)>1,--LEFT(A1:Z1),0))
for example:
Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key. If this is done correctly, the formula will appear with curly braces around it in the Formula Bar.
I want to use the Index formula to list data in my excel sheet.
I want to list the data of the column A that contains "finished" in the corresponding cells in column E.
Currently I'm using the following formula:
=INDEX(IMs!A:A;MATCH("finished";IMs!E:E;0))
The problem is, only the first value appears. I want to list ALL of them.
Is it possible with the vlookup formula?
Thank you very much in advance.
Kind regards,
Vanessa
First enter this formula in B1:
=COUNTIF(IMs!$E:$E,"Finished")
Then enter this array formula** in your first cell of choice:
=IF(ROWS($1:1)>$B$1,"",INDEX(IMs!$A$1:$A$1000,SMALL(IF(IMs!$E$1:$E$1000="finished",ROW(IMs!$E$1:$E$1000)-MIN(ROW(IMs!$E$1:$E$1000))+1),ROWS($1:1))))
Copy this formula down (though not the one in C1) until you start to get blanks for the results.
If the upper row reference that I chose (1000) is not sufficiently high, then change it as required. Note, however, that since this is an array formula, it is not recommended that you make this upper bound too high (and certainly don't reference entire columns!), since this will have a significantly detrimental effect on spreadsheet performance.
From your post, it also appears that you are using a version of Excel in which the argument separator in formulas is not the comma but the semi-colon. If this is indeed the case then you will need to make the necessary amendments to the formulas I provided.
Regards
**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
I'm using excel 2010.
I need a formula that will return the highest value of a mixed variable.
Look up VFL will return VFL00151
A1 VFL00001
A2 VWS00004
A3 VSC00056
A4 VFL00151
A5 VCC10025
A6 VGH00122
I'm avoiding using macros.
Thanks
With Col_A referring to your range in column A, and the lookup value (VFL) in C1, the following array formula (entered by holding down ctrl-shift while hitting enter, the following formula will perform as you request:
=IF(MAX(N(ISNUMBER(SEARCH(C1,Col_A))))=0,"",INDEX(Col_A,MATCH(MAX(IF(ISNUMBER(SEARCH(C1,Col_A)),--MID(Col_A,4,99),0)),IF(ISNUMBER(SEARCH(C1,Col_A)),--MID(Col_A,4,99),0),0)))
Of course, this assumes all of your entries start with three letters, and then are followed by digits.
Also, using the same set-up and assumptions as Ron Rosenfeld, but also assuming you're using Excel 2007 or later, array formula**:
=IF(COUNTIF(Col_A,C1&"*")=0,"",INDEX(Col_A,MATCH(1,(LEFT(Col_A,3)=C1)*(0+MID(Col_A,4,99)=MAX(IFERROR(0+SUBSTITUTE(Col_A,C1,""),0))),0)))
Note also that this solution is case-sensitive whereas Ron Rosenfeld's is not.
Regards
**Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
=MAX(--MID(A1:A6,4,LEN(A1:A6)-3))
ctrl+shitf+enter when you've entered the formula, to create an array formula. This assumes that all of your numbers have the same form, of 3 letters, then your number.
The mid formula takes the numeric part, based on the pattern you've outlined above. If the pattern is not consistent, you've got less hope with a formula. Doing this as an array, does all of the cells in the range in one step, and returns an array of numbers. This can then be 'maxed'
Update. To take this a step further, and do a lookup on the same principle (without error handling):
=INDEX(A1:A6,MATCH(MAX(--MID(A1:A6,4,LEN(A1:A6)-3)),--MID(A1:A6,4,LEN(A1:A6)-3),0))