Find Text Between 2 Characters With Multiple Instances In A Single String

Feb 9, 2013

The problem - I'm trying to find a formula that will find text between 2 characters with unlimited instances in a single string and combine the found text to a single string. The character enclosing the text i'm after will likely be a % symbol. This formula would then be replicated down 5000-10000 rows.

eg. 1 - This is %an% example %sentence% to show what I %am% looking for
eg. 2 - This %is another% example of what I %need%

eg. 1 answer - ansentenceam
eg. 2 answer - is anotherneed

Ideally this would not use a macro as it will be applied to an ever expanding data set but I realize that may not be possible.

View 3 Replies


ADVERTISEMENT

Find Multiple Instances Of Single Criterion In Row & Return To A Single Col

May 8, 2006

Find Multiple instances of Numeric Criterion in Row & Return To a Single
Column.

I have a Dynamic Named Range "Data" spanning 10 Columns and many Rows.
Each Row may contain duplicates of the Numeric Criterion.

I would like to find ALL instances of a specific Numeric Criterion across
each single Row in the Dynamic Range "Data" and have the Results returned to
a New Sheet in a single column.

NEW Sheet:
The Numeric Criterion is housed in G5.
The matched criterion should be returned to the New Sheet starting at G7.
Duplicate instances in the same Row should ALL be returned to the same cell
in Column G on the New Sheet.

Sample Data Layout:
Columns I J K L M N O P Q R
Row No.76 1 0 1 1 0 1 1 1 0 1
Row No.77 2 2 3 2 1 2 2 0 0 0
Row No.78 3 3 3 3 3 0 3 0 3 0

Scenario:
Looking for Numeric Criterion 1 (one).

Expected Results - New Sheet:
Row No.7 Column G (Cell G7) 1111111
Row No.8 Column G (Cell G8) 1

In Row 76 of the Sample Data ALL seven Numeric Criterion of 1 (one) should be
returned to the same cell G7.
In Row 77 of the Sample Data there is only one Numeric Criterion of 1 and it
should be returned to cell G8.

View 14 Replies View Related

Find The First 3 Characters Of A Text String

Nov 17, 2007

How I can change this formula to find the first 3 characters of a text string?

Instead of using numbers in column A, it will be Names, I need the user to enter only the first 3 characters of the name and then display the results, (Meaning that all others irrelaavnt rows will be hidden.

Sub myHidingRoutine()
Dim foundCell As Range

With ThisWorkbook.Sheets("Sheet1")
Set foundCell = .Range("a:a").Find(What:=.Range("a2").Value, After:=.Range("a2"), _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)

View 9 Replies View Related

Instances Of Single Digit In String Of Numbers

Feb 19, 2014

I am trying to write a function that will give me the amount of time a certain number shows up in the same digit place in a large set of numbers.

For example:

111112221233313
111212222233323
111312223233333
111412224233343
111512225233353
111612226233363
111712227233373
111812228233383
111912229233393

given the number set how many times does the number 5 show up in the 4th digit. I know its 3 but for the data size I need to run it on, it is impossible to count.

What function would count how many times a certain number shows up in the same spot?

View 8 Replies View Related

Find If Text Cell Contains A String Of Characters From Array In Different Workbook

Aug 12, 2011

I've scoured the internet for this answer and have not found a formula that works.

I have a list of domain names/URLs in column A of workbook 1:

jhjh.com
hajfh.co.nz
123.123.12.12

I have a list of domain name extensions in workbook #2:

.com
.co.nz
.net

I want to determine if the cells in column A workbook one contain any of the strings in workbook 2 - note that I need to look at the string, not the entire cell in workbook one. If there is a match, true, if not, false for that cell within workbook one.

It's sort of a reverse array lookup with text. It seems that cross workbook and text is what causes the challenge.

View 9 Replies View Related

Excel 2011 :: Find Multiple Text Strings In Another Text String

Mar 8, 2013

How do I use an Excel formula to find which (if any) multiple sets, each of up to 50 words, exist in a series of rows of a spreadsheet - if set A has one or more words found in a searched cell.

A positive result will return a specific value in the designated result cell. If none of the words in Set A is found in the searched cell, the formulae will repeat the test for the words in Set B, and so on.

After all 50 sets of words have been tested, the formula will move to the next cell in the searched column.

New words will be added to the sets of words continually as required.

Multiple words within sets are included in double quotes. Within each set of words there will be some n-tuples of words (i.e. 24 adjacent words) that contain one or more of the words in the set, but for which the formula will be required to return a negative result. Example: Set A = word 1, word2, word 3, "word1 word2 word3". (The words within a set could also be each entered in separate columns, as opposed to all included in a single cell.) The single column of text to be searched is about 10,000 rows.

I am wanting to use the above in a spreadsheet that contains data downloaded from a series of bank accounts to automatically allocate items of expenditure to one of 20 or so different categories of expenditure.

The formula will search the description field to find words that are used in the in the downloaded files from the various accounts to describe each transaction.

If a word describing travel expenditure (e.g. hotel, "holiday inn" but not "holiday travel") is found in the description of an expenditure item - the item cost will be allocated to the TRAVEL EXPENDITURE column, which is one of 20 or so different categories of expenditure.

Happy to consider a different solution if the task can be done better a different way.

Tried using a combination of INDEX/SEARCH/IF in Excel, but was not able to get a correct result. PS I am using Excel 2011 for Mac - which does not allow macros, so the solution needs to be entirely formula based.

View 1 Replies View Related

Find Multiple Instances Of A Value

Apr 28, 2009

I have four different sheets with email addresses in an excel file. There are some email addresses which are present in more than one sheet. I wanted to find these email addresses and remove its multiple instances.

I can't use the simplified version of vlookup, as I can't enter each email address to see if there is another instance.

Is there a way where the excel sheet can search within itself for duplicate values and if not delete/at least point them out, so that I can delete them manually?

View 3 Replies View Related

Excel 2003 :: How To Count Cells With Instances Text Not Instances Of Text

Aug 17, 2012

I'm using WinXP with Excel 2003 - I have a column of highway sign description data (16k+ rows).

Example:

Curve Arrow Right
Curve Arrow Left
Turn Arrow
Reversing Curve Arrow Right
Winding Road Arrow(plus many more unique entries)

I'm using SUM and COUNTIF to total the number of times "Curve", "Reversing", "Turn" and "Winding" appear in the column.

My formula is:
Code: =SUM(COUNTIF($F11:$F16196,{"*CURVE*","*REVERSING*","*TURN*","*WINDING*"}))

Which works great EXCEPT what I really want is the number of cells with any of those key words, not the total count of those words. The example above should be 5, but since row four contains more that 1 of the key words I'm getting 6.

View 4 Replies View Related

Using VBA To Find And Remove Multiple Instances From A List?

May 20, 2014

I have an input sheet with 3 columns: Currency pair, Tenors, and Value.

Like this:

EURUSD 1m 3
EURUSD 3m 0
EURUSD 1y 5
GBPUSD 1w 2
GBPUSD 1m 9
GBPUSD 2m 1

etc etc for about 100+ rows.

This input is exported from a system we have and may vary in length and values from time to time.

What I want to do is pull all the data for specific currency pairs (probably for 5 of the 10+ currency pairs it displays) onto another worksheet. And for each tenor for that currency pair, i want to perform 10-20 lines of analysis on the next sheet.

So, if GBPUSD was a currency pair I was interested in, I would need 10-20 lines for GBPUSD 1w, 10-20 lines for GBPUSD 1m, 10-20 lines for GBPUSD 2m, etc.

How can I pull this? While maintaining flexibility so if the tenors, currencies, and # of lines change?

View 1 Replies View Related

Find Multiple Instances In Multiple Workbooks

Feb 16, 2008

I'm trying to search through a group of Excel files for specific values in column B and then copy and paste the value from column C of the same row into the current worksheet if the search term is found. Thanks to some help from turtle44, I can do that if the search term only appears once, but if it appears more than once, I can only find the first occurance.

I have searched through te archives and found lots of people asking for the same thing. The common suggestion is to use .FindNext, but no matter how I try to use FindNext, it doesn't give me the results I want. It either seems to find the first occurance again or to find nothing at all.

Here is a simplified version of my code, if someone could just explain how to find the second occurance of "Use Code" and past the relevant value into column F of the destination workbook, I'd appreciate it and I should be able to work out the rest on my own.

Sub SearchAllXLSFiles()

Dim lCount As Long
Dim wbSource As Workbook
Dim wbDestiny As Workbook

On Error Resume Next

Set wbDestiny = ThisWorkbook

View 5 Replies View Related

Find Position Of Various Characters In String

Jul 11, 2014

Is it possible to find the location of different characters in a string (using VBA)? Normally I would use InStr of InStrRev option in VBA but my situation is a little more complicated.

The character I am looking for is not always the same, sometimes it is a , or a . or a : or a "blank" etc

I tried to do it like:
dim strChar as string
strChar = "[,.? /]"

SearchPosition = InStr ("cell location", strChar) (searchposition is the name of the function I am trying to make)

This works if I define only 1 character, this way it gives me a 0 as outcome

I have tried to change it to strChar = "[,]" or strChar = "[.]" or strChar = "[ ]" but this doesn't work.

View 13 Replies View Related

VB Code To Find Instances Of Text In Worksheet And Colour Entire Row

Aug 21, 2012

I'm trying to develop code that will perform the function in the title. I want to use an if statement that looks at cells across the worksheet and where it finds certain text it should colour the entire row. I would also like to be able to input the text via a user box. I don't necessarily want the code

View 3 Replies View Related

Formula To Find Characters After Last Space In A String

Aug 27, 2007

I have text string and would like two formulas to find,

1) the characters after the last space and

2)to find the number of characters after the last space.

View 9 Replies View Related

Formula To Find Characters After The Last Space In A String

Aug 28, 2007

I have text string and would like two formulas to find, 1) the characters after the last space and 2)to find the number of characters after the last space.

View 9 Replies View Related

Pull Out Text Between 2 Characters In A String

Apr 3, 2009

I'm trying to pull text out of a middle of a long string of data located within one cell. The string is not always the same size and the text I need to pull out is not always in the same spot

For example - in this string

source=google&adgroup=Jimmy Bop (Broad) >>/yes/klingon/GetStarted.aspx >>/finace/success.aspx?

I want to pull out the text "Jimmy Bop (Broad)
It will always be between "adgroup=" and ">>/" (although sometimes the character ">>/" will appear multiple times within the string.

View 9 Replies View Related

Extracting Data Between 2 Characters In A Text String

Dec 14, 2013

I have the data string below:

Career:25: 1-0-2 $13,765

I would like to extract the 1 between the : and - and as a seperate extraction would like te 2 between the - and the $ I have tried a few things but end up with the - as the length of the data changes

View 5 Replies View Related

Strip Unwanted Characters From Text String

Sep 8, 2009

Is there an Excel function that can strip a specificed unwanted character from a text string to leave all the other characters excluding the unwanted one?

e.g. if the original text strings were (in separate cells within a workbook):

C-2C-9C-9-XA-10A-10-BA-10-XA-8N-7-D

The function would strip the "-" to leave:

C2
C9
C9X
A10
A10B
A10X
A8
N7D ...etc.

View 9 Replies View Related

Count Number Of Characters In String/Text

Aug 24, 2006

If 'a' is a string that contains x number of characters, how do I find out what x is (in VBA)?

View 2 Replies View Related

Insert Multiple Characters Into String With LEFT RIGHT Functions?

Apr 29, 2014

I've got a long list of account numbers of varying length and ultimately need to add a dash and a dot into these numbers. Here's an example

12345678 to> 1-2345.678
123456789 to> 12-3456.789
1234567890 to> 123-4567.890

The standard format is always 3 numbers after the . and 4 numbers between the - and .

I can get to this by doing a series of functions starting with this:

=LEFT(A1,LEN(A1)-3)&"."&RIGHT(A1,3) to get 12345.678 or 123456.789

copy/pasting that value into another field and then doing this

=LEFT(E1,LEN(E1)-8)&"-"&RIGHT(E1,8) to get the results above

I can't quite figure out the format to combine the multiple steps/functions into one so that I'm not copy/pasting values and re-doing the function.

View 7 Replies View Related

Text String To Single Character Array?

Jul 13, 2012

There is a method to use ROW(1:10) within an array formula to strip a string into individual elements e.g.

HELLO > {"H","E","L","L","O"}

I cannot find it anywhere, thought it was something like =MID(A1,ROW(1:10),1) but not yielding results.

View 4 Replies View Related

Converting Single Address String To Multiple Fields

Jan 11, 2007

I recieve a spreadsheet each month with the following column of data:

9 Paddington House
PO Box 73
Whiteleys of Bayswater
9-10 Grove Road
134/138 Drymen Road
44-46 The High Street
1 Midland Road
48 Donegall Place

As you can see, it consists of addresses, each line is a separate address. I need it to be converted so that the data is split into the following 5 fields:

Street number from
street number letter from
street number to
street number letter to
street

If there is no street number , then it should just enter the data into the street field. If there is a range such as 44-46, it should enter the 2 numbers into the from and to fields. Sometimes this is in the format 44/46. Also, sometimes there are letters, eg 44a-44b, in which case each section (ie 44, a, 44, b) needs to be in a spearate field.

View 9 Replies View Related

Find All Instances Of "Text" In A Range, And Add Time Attached

Dec 23, 2009

I am not even sure if what I need is a possibility with excel. I need to "find" specific information and the amount of time that is attributed to it. All of the information is provided via drop down box (times as well) in daily segments then grouped by two week (bi-monthly) chunks and have the total times for each information type placed elsewhere. There are notes placed in the excel file to the right of the information you will see when first opening the file.

View 4 Replies View Related

How To Trim Text In A Single Cell Base On Special Character In String

Dec 2, 2013

i have a device that produce its data as following:

NTFLog_D2013-02-12_T104016.csv

I need to divide the single column to 7 column as separated by semicolon ";"

View 2 Replies View Related

IF.. Contains...then: Search Through The Text String In That Cell And Find A Certain Word, Find And Retrn A Value

May 23, 2006

I am having trouble getting my IF statement to test if the cell contains the text "sale" return "X" if not "Y". I need it to search through the text string in that cell and find a certain word, and if it finds that word, retrn a value. I am really having difficulty with is what symbol or function do I use for the logical test? (i.e. =, <>, MATCH, INDEX?)

View 4 Replies View Related

Find Text Between Characters And Remove Hyphens

Sep 19, 2006

I need to make a macro that will find text between "o/" and "/", remove hyphens from the text it found, and then add it to the end of the current cell contents.
I know how to add to the end of current cell contents, but cannot figure out how to grab text between certain characters or replace hyphens and replace with spaces.

View 3 Replies View Related

Find Numbers Next To Specific Text Characters In A Cell

Oct 15, 2012

I'm faced with receiving data for time, in a text format, as follows:

Example of possible cell contents...

20secs
40m20secs
2h40m20secs

I'm not interested in the secs value but need to isolate the h (hours) and m (mins) values to use in another formula as numbers. The time could be shown in either of the above formats with either; (a) just secs, (b) mins & secs or (c) hrs, mins & secs... and of course the hours or mins values could be 1 or 2 digits in length. How can I determine (using formula only, not vba) what the values for hours and/or mins are dependent upon what is present?

View 9 Replies View Related

Search For All Instances Of A String

Jul 11, 2009

I'm using the following code which is working well. It finds an instance of the string "A83". Once it finds it, it moves down x number of cells and populates it with a new string. It then moves down another x number of cells and populates it with another new string, etc.

The problem is, it is only looking for "A83" one time and performing the appropriate actions at that point. What I need to do is look for *every* instance of the string "A83" and perform the appropriate actions.

View 10 Replies View Related

Remove Multiple Characters From Text

Nov 20, 2006

This may be a very simple question so forgive me for my ignorance. I have text in individual cells that look something like this (not actually addresses but same format):

Doe, John – 123, Anywhere St (Apt A), Anytown Anystate 12345

I have about 5,000 records. I would like to convert the records to look like this:

Doe John 123 Anywhere St Anytown Anystate 12345

Basically I want to take out all non alphanumeric characters and anything between curved or square brackets. In my minds eye my macro would read something like this:

Do until last character.

If character = alphanumericTrue – Move to next characterFalse – If character = spaceTrue – Move to next characterFalse – If character = curved or square bracketTrue – Delete all text in brackets including brackets then move to next characterFalse – Delete character then move to next character
Loop. I would of course create an additional loop to run down the 5,000 records.

View 6 Replies View Related

Find & Copy Multiple Results Into Single Cell

Sep 29, 2007

I have a macro which scans column "AV" in Sheet1 and if a particular value is found it will copy certain cells from that row and paste them into Sheet2 on Row 10 starting with column "E".

With the current code I only paste a single instance, if the value is found more than once I only have the last one pasted. How can I best set this up so it will paste ALL found value results within Row 10?

The four copied results do not have to be in separate cells, it is actually best if the cells are combined. On Sheet2, cells E10-H10 can also be setup to have the data pasted across all four cells and that way Row Height AutoFit would take care of expanding the row's height to accommodate the possibly of having four or five sets of results being combined together and pasted into E10.

Rather than the typical result appearing as:

[TABLE]______E___F___G___H
10__1223 122 2222 2222
11__343 565 4554 5990
12__9755 334 6787 6788[/TABLE]

It is better for me if the data appears like this:

[TABLE]_____E____F____G____H
____1223 122 2222 2222, 343
10__565 4554 5990, 9755 334
____6787 6788
[/TABLE]

Is this even possible using a macro? It is currently being done using a Word document but I am wanting to automate the process and try to handle all the data sorting within Excel, if possible.


Sub Number()
Dim colSearch As Range
Dim celVal As Range
Dim celRow As Range
With Sheets("Sheet1")

View 9 Replies View Related

Find Last Row With Text String

Jun 16, 2009

The following line finds last "non-blank" row in a column. I have a column that has formulas in 10000 rows. Most of the time only first 7000 rows will have data, other cells below will have "". I need to find the last row with real data, not "".

Is there a way to add a condition or check to the following line?

View 6 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved