I have a column of Text Strings. Some of them have ASCII Characters greater than Char(127). I'd like to have a formula in the column next to it that will search the first column for any characters either in a range of ASCII characters or greater than Char(127). If it finds one that I'd like it to simply display "found" otherwise be left blank.
Is there a formula that would do this?
Assuming your text strings start in A1, use the following formula and copy down:
=IF(MAX(CODE(MID(A1,ROW(OFFSET($A$1,0,0,LEN(A1),1)),1)))>127,"found","")
Validate the formula with Ctrl+Shift+Enter as it is an array formula.
Related
Is there a formula that can be used to analyse an array (say A1:A10) and return a condense list of that same array but remove all blank cells? The only caveat is, every cell in range A1:A10 is a formula, with some resulting in "", which are visually blank but obviously the cell itself contains a formula.
In the screenshot, the data in A1 is a formula =IF(ISEVEN(ROW()),ROW(),"") so every other row will evaluate to an empty string.
The formula in C2 is the array formula
=IFERROR(INDEX(A:A,SMALL(IF($A$1:$A$10<>"",ROW($A$1:$A$10)),ROW(A1))),"")
Array formulas must be confirmed with Ctrl-Shift-Enter, unless you have an Excel version with the new Dynamic Arrays formulas.
I will try my best to make this as simple of an explanation as possible.
Cell A1 contains a series of data looking like:
X001DDWIQ3(607093),X001E6Y98T(81299),X001E6Y98T(81299),X001DDWIQ3(607093),X001R5N087(605253),X00185UHG9(439599),X00185UHG9(439599),X001RPL9AN(37),X001PBDU9R(101),X0017I5MV7(439599)
Cell B1 is similar and has corresponding data:
CAE1,CMH1,DFW7,EWR4,MKC6,MKE1,OAK4,ONT2,SNA6
Cell C1 contains one value from Cell B1
EWR4
Since EWR4 is the 4th item in Cell B1 then it coordinates with X001DDWIQ3(607093), the 4th item in cell A1.
Since all of the items in B1 are 4 characters long separated by a comma and no spaces I can use the formula:
LEN(LEFT(A1,FIND(C1,B1)-1))/5+1
to determine the position in B1 that C1 occupies.
What I am trying to do is extract the corresponding value into Cell D1. The only constant information I can extract from what I have now is that the desired value is located between the 3rd and 4th comma, and the characters outside of the parenthesis always have a count of 10. The number in the parenthesis is dynamic, and that is what is stumping me.
I need to determine how many characters up to the 3rd comma and the 4th comma to utilize as my start and stop points for an =MID.
Your LEN(LEFT(A1,FIND(C1,B1)-1))/5+1 can be simplfied to:
(FIND(C1,B1)-1)/5+1
Then we can use that in a mid that adds 99 spaces for every , which gives us a large target to find. Then we trim the return.
Use:
=TRIM(MID(SUBSTITUTE(A1,",",REPT(" ",99)),((FIND(C1,B1)-1)/5)*99+1,99))
I have a series of alphanumeric data in 'A' column:
I want the sum of the numeric values in cell "B1" for all ending with k and a sum of all ending with p in cell "C1".
I mean adding all the numeric element of the values.
Apply Text to Columns to ColumnB with fixed width and the split after the first character.
in C1 enter =A1&B1 and copy down to suit.
in D1: =SUMIF(B:B,"k",A:A)
in E1: =SUMIF(B:B,"p",A:A)
Select ColumnsC:E, copy, Paste Special…, Values over the top.
Delete ColumnsA:B.
Perhaps with an array formula**:
=SUM(IF(RIGHT(A1:A100)="k",0+SUBSTITUTE(A1:A100,"k","")))
Change the range (A1:A100) to a suitably larger one if required - though not TOO large (and certainly don't use A:A!) since, unlike e.g. SUMIF(S), array formulas calculate over all cells within the range, whether beyond your last non-empty cell or 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).
I have a table setup like this:
I am trying to do a lookup, where Column D value matched one of the Column A values and returns Column C value.
The numbers in column A and D are stored as text.
My formula is VLOOKUP(F3,A1:C3,3,TRUE) but this returns "Value not available error". What is wrong with the formula?
EDIT
Figured out that some of the values were stored as general.
Now the problem is that I have to get an exact match with leading zeroes.
For example in Column D I have "27154" but in Column A I have "000027154", these should match.
But if I have "000271540" or any other variant in Column A, it should not match.
All the numbers in Column A are 9 digits long with leading zeroes where needed.
VLOOKUP(TEXT(F3, "000000000"),A1:C3,3,FALSE)
It will require creating the same value for the VLOOKUP to find the value. Looking at your example, the length of the text in column A is 9 characters. As a result, the padding is applied which will be used to search. To make it exact match, FALSE is used as last argument to VLOOKUP.
You can use wildcards in VLOOKUP:
=VLOOKUP("*"&F3,A2:C3,3,FALSE)
There's nothing wrong with the formula. The problem is that the value in A2 is text and treated as text when comparing to the number in F3.
If you can't change your values in column A, then you can use this array formula:
=SUM((F3=VALUE(A2:A3))*(C2:C3))
Enter with CTRL+SHIFT+ENTER
This will convert the values in A2:A3 as numbers for the comparison against F3.
Example, for the word apple. I want the output to be
apple
a.pple
a.p.ple
and so on. I need to get all the possibilities. The only rule is it can't have two periods in a row and also no periods at the end or start.
How can I do this in excel? Even a simple .txt would be okay as well.
This can be done in Excel by using string formulas. This is what my worksheet looks like:
The formula in cell B2 is: =LEFT($A$1,A2)&"."&MID($A$1,A2+1,5)
Cell A1 has the string "apple", and cell A2 has the integer 0, B2 has the string ".apple" (which you don't want, so you can ignore this value). I drag down the column of integers in column A from 0 to 5.
The "LEFT" formula takes the leftmost characters of a string, and then i insert the period between this and the following characters which are brought in using the MID formula. Since the input for LEFT and MID is the integer value in column A, this will output in column B every such combination you are looking for. Note you MUST lock cell A1 in this formula, as the string will always be in cell A1.
Hope this helps!