Questions tagged [instr]

89 questions
0
votes
1 answer

If Count is over _ amount, and FileName does NOT contain _

I'm looking to construct my IF, Then, Else statement to deal with all possible occurrences in my reports. If the number of occurrences of a variable (fCount) is over 6 and the Filename (fName) does NOT contain the string "RADMON", then save the…
0
votes
0 answers

How do I count records found by InStr() method?

Hey I am using If InStr(1, rs.recordset1, rsx.recordset2) .. to find matching records. If there are more than 15 matches I want to exit the If condition. How can I count the records? Code Example: Do Until rs.EOF If InStr(1, rs.Fields("Column1"),…
0
votes
0 answers

VBA using instr when found cells that include text add to other row

I made macro that find cell which include text in other cell. I needed to list them to other place by using space of other two row this is example IF text of A1 is included in B1 paste A1 to C1 and B1 to D1 like this patern compare A1 to B row and…
낙하산
  • 11
  • 1
0
votes
3 answers

Is there an equivalent of vb.net's instr in R

I am rewriting my vb.net code in R and have come to a roadblock. The code in vb.net essentially counts the number of characters in a string that do not occur in a string of allowed characters. The code in vb.net…
Jamie
  • 555
  • 3
  • 14
0
votes
2 answers

Need to assign a value to string in Oracle

I want to assign a value to string column. Below is the column contains the leave and working day data of one month. Holiday_list (Column name) -------------------------------------------------- WHHHHHHHWHHHHHHHWHHHHHHHWHHHHH I want to know what…
0
votes
0 answers

Is the attached VBA Syntax Correct

The below code is writing an invoice's fields to an array. Most rows have a PO# starting with "MX" (eg. MX111111, MX222222), and it's always either in column E or F. All other data fields are the same offset relative to the PO#. For example, "item…
0
votes
1 answer

Nested InStr VBA Excel

I'm trying to loop and find some components in a long list of code to past to different cell. For now I got this Sub przenoszenie() Dim wb As Workbook Dim komorka As Range Dim komorka2 As Range Set wb = ThisWorkbook Set komorka =…
0
votes
0 answers

Crystal Reports Selection Formula Crystal Syntax - searching dates in numeric or with slashes / or dashes - between DDMMYYYY

I want to create a formula extracting dates that might be in a text field that could be formatted DDMMYY, DDMMYYYY, DD/MM/YY, DD/MM/YYYY, DD-MM-YY or DD-MM-YYYY. How is the best way to write it please? I have seen a post that searched for the"/" and…
JRo
  • 1
  • 1
0
votes
2 answers

Oracle Nested SUBSTR Compare

I'm trying to query a table, and my criteria requires me to match a literal with a substring of a column, like this: SELECT ......... FROM issuer_table WHERE owner = "ABC" AND {substr logic} = v_cik_nbr; My column values are like this: …
Landon Statis
  • 683
  • 2
  • 10
  • 25
0
votes
1 answer

How to use INSTR with Kohana ORM?

I need to make changes to some old system made with framework kohana (ver. 3.1.1.1), an input where the user must write at least part of the name and the system must output the results. Usually I work with PHP where I can do it easily…
Alan Alvarez
  • 646
  • 2
  • 11
  • 32
0
votes
2 answers

String comparison in Databricks Spark SQL

select distinct promo_name ,case when substring(promo_name,instr(promo_name, "P0"),2) = "P0" then 0 when substring(promo_name,instr(promo_name, "P1"),2) = "P1" then 1 When substring(promo_name,instr(promo_name, "P01"),3) =…
user3061338
  • 37
  • 1
  • 9
0
votes
1 answer

InStr or Split in the following scenario

I need to find this in a text file Property Name="Manufacturer" Value="LENOVO"/> Result that I want output is something like this Manufacturer= LENOVO I've tried using examples from both Split and InStr but the issue I am having are all the Quotes…
TomC
  • 11
0
votes
1 answer

Conditional format based upon the date string

In my table I have the date in the format "dddd , mmmm dd, yyyy". So for example "Sunday ,July 05,2020". I want the macro to format cells that have the word "Sunday" in and can't get it to work. I can change it to the dd string (ie 17) or the…
0
votes
6 answers

Substring from underscore and onwards in Oracle

I have a string with under score and some characters. I need to apply substring and get values to the left excluding underscore. So I applied below formula and its working correctly for those strings which have underscore (_). But for strings…
Arun.K
  • 103
  • 2
  • 4
  • 21
0
votes
0 answers

How to append a string within a single column in VBA

I have a column of data that I'm trying to search through for certain strings. After I find the string I want to add a new string to that cell. Sub Scan() Salesforce = "Fail - Incorrect % in Draft" Calculation = "Fail - Incorrect Calculation…