Vlook up returning #N/A if you're using text? - vlookup

I want to return '1' matching it with a text like 'Apple' but it seems to always return #N/A
enter image description here

Related

Regex for values that are in between spaces

I am new to regex and having difficulty obtaining values that are caught in between spaces.
I am trying to get the values "field 1" "abc/def try" from the sameple data below just using regex
Currently im using (^.{18}\s+) to skip the first 18 characters, but am at at loss of how to do grab values with spaces between.
A1234567890 field 1 abc/def try
02021051812 12 test test 12 pass
3333G132021 no test test cancel
any help/pointers will be appreciated.
If this text has fixed-width columns, you can match and trim the column values knowing the amount of chars between start of string and the column text.
For example, this regex will work for the text you posted:
^(.*?)\s*(?<=.{19})(.*?)\s*(?<=^.{34})(.*?)\s*(?<=^.{46})
See the regex demo.
So, Column 2 starts at Position 19, Column 3 starts at Position 34 and Column 4 (end of string here) is at Position 46.
However, this regex is not that efficient, and it would be really great if the data format is fixed on the provider's side.
Given the not knowing if the data is always the same length I created the following, which will provide you with a group per column you might want to use:
^((\s{0,1}\S{1,})*)(\s{2,})((\s{0,1}\S{1,})*)(\s{2,})((\s{0,1}\S{1,})*)
Regex demo

Google Sheet Conditional Formula for IF function

Trying to make a Google Sheets Formula for Conditional Formula that when a cell in column "A" is equal to then change the background to red if Cell in the matching row in column "E" is empty
I started with REGEXMATCH but I couldn't figure out how to format it.
Basically, if the company's names match they require a PO# in which it would mark the cell red if not filled out
try:
=($A2<>"")*($E2="")
apply it on range A2:A

How can I achieve this price REGEX with REGEXMATCH in Google Spreadsheet?

Here is the deal,
I want to allow user to enter this kind of entries in my price column:
1 or 1234 or 1234,1 or 1234,1234 ...
So I've used this regex which works fine with REGEX101's website
^\d+(,\d+)?$
https://regex101.com/r/D5dAXx/1
only problem is that it doesn't work well with Google spreadsheet's function REGEXMATCH
=REGEXMATCH(TO_TEXT(C2), "^\d+(,\d+)?$")
for example this entries do not match
1
12
1,123
when this entries matches correctly
1,1
1,12
Why is that and what could be the correct REGEX?
My problem was a bad format on the column.
When I entered:
12,1234
the format turned it into
12.1234
which was not matching my REGEXMATCH.
This means data validation criterion comes after the formatting in google's spreadsheets

Can I use Regex to return a value based on a specific match?

If I have a list of addresses related to a specific city for a given company/entity, can I use regex to return that address to me vs doing it in code (db query)? For instance if I have:
Manhattan|600 Broadway, 10023|
San Francisco|100 Taylor Street, 94133|
Can I have some regex with namegroups that returns that address something along the lines of
(?<LOCATION_CITY>Manhattan)(?<LOCATION_BUILDING>600 Broadway)?|(?<LOCATION_CITY2>San Francisco)(?<LOCATION_BUILDING2>100 Taylor)?
I get that that is not the correct regex but as a starting point I am wondering if I can use one matched namegroup in the scanned text block to return a known value that is not in the text block. The result I'd be looking for is:
LOCATION_CITY: Manhattan
LOCATION_BUILDING: 600 Broadway
or
LOCATION_CITY: San Francisco
LOCATION_BUILDING: 100 Taylor Street
Where Location City is returned because it is found in the text and LOCATION_ADDRESS is returned because the associated city was found.
How about:
^(?<LOCATION_CITY>[^|]+)\|(?<LOCATION_BUILDING>[^|,]+)

Find matching strings in table column Oracle 10g

I am trying to search a varchar2 column in a table for matching strings using the value in another column. The column being searched allows free form text and allows words and numbers of different lengths. I want to find a string that is not part of a larger string of text and numbers.
Example: 1234a should match "Invoice #1234a" but not "Invoice #1234a567"
Steps Taken:
I have tried Regexp_Like(table2.Searched_Field,table1.Invoice) but get many false hits when the invoice number has a number sequence that can be found in other invoice numbers.
Suggestions:
Match only at end:
REGEXP_LIKE(table2.Searched_Field, table1.Invoice || '$')
Match exactly:
table2.Searched_Field = 'Invoice #' || table1.Invoice
Match only at end with LIKE:
table2.Searched_Field LIKE '%' || table1.Invoice