Lookup Part Text In Range In Cells Holding Text Strings

Sep 27, 2006

I try to write the function that gets some "ref" and returns appropriate item.
For example: if I give to function "C3", it returns "AAA"
if I give to function "R18", it returns "BBB" (cause it between R15 to R26)
if I give to function "R9", it returns "BBB" also.

View 9 Replies


ADVERTISEMENT

Strings In Text Cells Of Lookup Table To Inform Conditional Formatting

Jan 3, 2013

I have a 1000x1000 cell grid on one of the worksheets in my workbook where each cell contains one of the following four possibilities:

1) Blank
2) A string that is not defined in a lookup table (*lookup table = a named range on a different sheet)
3) A string that exactly matches an item in the lookup table
4) A long string that contains an item in the lookup table (which can be found with a FIND function, for example)

I would like to apply conditional formatting to my 1000x1000 grid, to color each cell according to the lookup table, where the last column has the name of a color that I can match with my conditional formatting setup.

I have solved everything except for No. 4).

2) is taken care of by using "Format only cells that contain" with "No Blanks"

My solution for 3) - using "Use a Formula to Determine Which Cells to Format" - uses
=VLOOKUP(A1,lookup_table,2,FALSE)="fill color name" So, for every different color I want to use, I have a different Formatting Rule in the Conditional Formatting dialog.

But 4) is tricky, because VLOOKUP can only return the result for a specific cell value.
If my cell contains France;Germany;Italy, I'd like the color to be according to what I set for "France" in my lookup table. Or, if my cell contains Germany;France;Italy, I'd like it to be set based on what I decided Germany is in the lookup table (i.e. "blue").

You can notice that one thing that is consistent is that I separate my "sub-strings" that are contained in the lookup table with a semi-colon.

So, one way might be to see if FIND finds a semi-colon, and then grab the string that goes before that character position.

View 4 Replies View Related

Lookup Part Of Text String In Userform ComboBox And Search For Value In Sheet Range

Feb 12, 2014

I have a worksheet with following values:

A
B
C
1
Shorts
75

[Code]...

Also I have a Userform with 2 ComboBoxes named "ComboBox1" and "ComboBox2". Values in ComboBox1 is "Pull my pants", "Eat my shorts", "Socks for everyone".

What I would like to do is to search though column A and look for any of these textstrings in my selection in ComboBox1 and return the value from column B in column C.

Example: "Pull my pants" is selected in ComboBox1 then the value "pants" should be found in column A and value in column B (25) should be entered in cell C2.

I am fairly new to VBA and have spend hours searching Google and found some formulas like InStr and VLookup. My problem is that I am not sure if these statements will do the job and how to combine them.

View 1 Replies View Related

Count Amount Of Cells Within Range That Contain Multiple Strings Of Text

Apr 22, 2013

I'm trying to build a formula that counts the amount of cells within a range that contain multiple strings of text within the same cell. I only know how to build a formula that snags cells that contain 1 but not 2 different ones within the same cell. For example: I want to count cells if they have the word BALL and STICK somewhere in the cell....see three cell examples below

gameballnetstick
ballgame
stick ball
tenballs
green stick

Of the three examples: it would only count cells: gameballnetstick and stickball

View 2 Replies View Related

Lookup Number In Cells Holding 2 Numbers

Jan 5, 2007

I am given a number say 155 and want to find out which range the number falls in. For example there are ranges like 142-151,152-161, and 162-171. I need a function that tells me my number 155 belongs to the labeled range 152-161.

View 9 Replies View Related

Text Trimming - Display Part Of Cells Text Value Inside Another Cell

Jun 15, 2014

I want to know how to display part of a cells text value, inside another cell.

Suppose in cell A1 i have "20-Jun-14"

How would I get cell B2 to display just "Jun"?

View 4 Replies View Related

Lookup Part Text

Oct 12, 2007

I am not sure if a vlookup can do the following.

I have a spreadsheet in excel with lots of rows. In column A I have some descriptions such as:

British Pound
Danish Krone
Japanese Yen

I have created another spreadsheet 2 columns that would have something like:
column A/columnB
British/Yes
Danish/No
Japananese/Yes

This 2nd spreadsheet can grow and have more lines.
In column Z of the 1st spreadsheet, I want a formula to look at the second spreadsheet and if any word in the column A of the 1st spreadsheet matches the word in column A of the second spreadsheet, I want it to the value in column B of the second spreadsheet.

View 4 Replies View Related

Find Text In Range With Part Of Text

Aug 27, 2006

I'm trying to create an Excel function that allows me to choose a row from a table based on text found within entered data. For example, say I have a table called "categories" that looks like this:

Categories
cat
dog
mouse

Now in a different section of the workbook, I want to be able to enter an arbitrary number of sentences, one per row, that look something like:
"It's raining cats."
"The mouse is hiding."....................

View 3 Replies View Related

Replace Part Text With Text From Cells

Sep 20, 2008

Structure:

I have a worksheet with the cells in one of the columns having html tags inside of each cell.

The tags vary by location within the cell and there are anywhere from 0-10 tags per cell.

Column A is the text string. Inside these cells are the tags. The tags are of form

<A href="/mortgagecenter/article_alias">

The

<A href="/mortgagecenter/

and

">

parts are true for every instance of this string....

....article_alias is a variable per each string. I have columns B and C which are the aricle_alias names and article_ID's, respectively.

What I am trying to do:
From the [quote]<A href="/mortgagecenter/article_alias">[quote]

I would need to replace the

article_alias

portion with

ArticleID&"-"&article_alias

View 6 Replies View Related

Assigning Data Range From 2 Strings Of Text

May 4, 2009

Im new to Macros. Im trying to find a string of text assign that to be the top of the data and then find a different string and assign that to be the bottom of the data. Then run a loop whilst inside that data range. Am i going about it the right way? Attached is a sample data file.

View 4 Replies View Related

Changing Case Of Text Strings Within A Range

Mar 2, 2007

I receive data from different sources and one column is usually in upper case, but I prefer to use proper (title) case. The problem is that the data frequently contains text strings that should remain in upper case or should combine upper and lower case letters. Examples follow:

Data received:
COROLLA AE90, AE92
COROLLA SX, GTI

Data should look like:
Corolla AE90, AE92
Corolla SX, GTi

Note that 'GTi' is upper case 'GT' and lower case 'i'.

I've set up a spreadsheet 'CaseConverter.xls' as a look-up, with a range ('SpecialCase' - A2:A65536) featuring names, codes and acronyms represented correctly. Is it possible to use a macro to run Excel's global replace to search for upper case strings in one spreadsheet and replace with the correct strings from the other spreadsheet? The macro would have to loop through the entire 'SpecialCase' range and look in the supplied spreadsheet for versions of the data in the special case range without being case-specific. The supplied spreadsheet (see attached for example data) is called 'Application.xls'. Column B is what I'm trying to reach.

View 3 Replies View Related

Extract Text Strings Within Brackets From Range

Apr 12, 2008

I have a column of data in the following format:

Hardware (somethingsmall) otherinfo
Hardware ( somethingdisplaced)
Blackbox item (somethingelse) other info
Service(aservice)

etc

I need to extract the data within the brackets allowing for additional spaces for use in a second query which will search for each individual line item in turn.

For some reason the query does not like searching for the raw data in it's current format so I'm trying to extract the key information for searching instead.

I can do it in excel by:

(Assuming data is in cell V36)

'in colum x
=FIND("(",V36)

'in column y
=FIND(")",V36)

'in column z
=MID(V36,X36+1,Y36-(X36+2))

in column aa
=IF(LEFT(Z36,1)=" ", MID(Z36,2,20),Z36)

I have tried doing this cleverly in VBA and failed and then ended up trying to enter this code in the cells within the VBA code and do it that way but I'm having difficulty in doing this also.

View 8 Replies View Related

Count Strings/Text Within Date Range

May 2, 2008

I am very comfortable with VBA but I usually avoid using formulas if at all possible (unfortunately, I have, formulas are unavoidable (by request).. so formulas it is)

I will try to explain

Column A is a list of dates (ever expanding)
Column B is a list of names ( multiple entries of various names but aligned with various dates)
Column H is a list of names (each possible name which can appear in column B, no duplicates)

Cell I1 = A Date
Cell J1 = A Date
(forming a date range)

Basically what I need to do is:

= COUNTIF(B:B,H2) - but only count it if it is withing the date range (>=I1 & <=J1)

I have tried wrapping it in an IF statement but I can't seem to get it to work.

View 7 Replies View Related

Find Specific Account Value From A Range Of Text Strings

Jan 6, 2014

Need formula to find a specific account no. from a range of text and return that account's value as a usable numeric.

Account number:012345678 XZ
Account value as of 12/31/2013:$12,345,56

Account number:987654321
Account value as of 12/31/2013:$876,543.21

View 12 Replies View Related

Extract Strings From Range Of Variable Length Text

Jan 18, 2008

I have the following issue. I have a list of strings. Each string contains certain characters that are exactly the same for all strings, some characters are different making the string longer (in some cases). What I need to do is extract some combination of characters from each string. The strings look like this:

AB & CDE & FG & I mmmm yyyy.HIJK
AB & CDE & FG & II mmmm yyyy.HIJK

The part "AB & CDE & FG & " (incl. spaces) is the same for each string. The next part contains a roman count from I to VII, causing the length of each string to vary. The "mmmm" part contains the current month spelled in full e.g. December. This part differs as well, for each string. The "yyyy" part contains the year in four digits, e.g. 2007. The part after the dot is the same for each string again.

What I need to do:
- is to extract the month and assign it to a new string
- extract the year and assign it to a new string
- extract the roman number, translate it to a normal number (II -> 2) and assign to a string (or integer).

View 2 Replies View Related

Delete All Numbers Like: #####-## From Text Strings In Cells

Jun 23, 2008

I need to remove multiple instances of pages numbers from a 2000 character text string I have dumped into a cell. The spacing is not equal between the page numbers but they always take the form |#####-##| i.e. bar delimited 5 digit-2 digit. I tried SUBSTITUTE but it will not accept wildcards. I was thinking of looping through a SEARCH. The numbers are ordered ie |00001-01| to |00001-25| then |00002-01| etc, stopping at 25. This might lend to looping but I couldn't wrap my head around the VBA to accomplish that. A sample of the text

"|00006-01| (Defendants' Exhibit Nos. 1,2 marked for |00006-02| Identification.) |00006-03| BY MR. JOHNSON: |00006-04| Q. Doctor, I am handing you Exhibits 1 and 2. |00006-05| Exhibit 2, is that the one that you brought with you, |00006-06| the deposition notice of today? |00006-07| A. I believe so, yes." Auto Merged Post Until 24 Hrs Passes;I should have said this before but this is for use on Excel 2003 WinXP.

View 8 Replies View Related

Search Range For Part Strings

Aug 21, 2008

I am using the following code to search a database of information and then display it on a different sheet.

The user types the search term into a textbox and then presses a command button to search the database.

Currently it only searches for an exact match. How can i adapt it so it searches for similar strings?

Sub SearchDatabase()

Dim rRange As Range
Dim rCell As Range
Dim ResultsOffset As Integer
Dim ResultsRange As Range

On Error Resume Next

View 9 Replies View Related

Replace Part Of Text In Range

Aug 25, 2006

I would like to use some vba code to search range T3 to U500

and search for the word "all out" which will appear within the text of some cells - in the format :-

64 all out(36 overs)

and replace it to

64 all out(50 overs)

the two digit total at the beginning of the line can be 1-3 digits and the number of overs can only be 1 or 2.

View 4 Replies View Related

Counting Number Of Times TA Shows Within Strings Of Text In A Range Within Sheet?

Dec 7, 2011

How would I go about counting the number of times TA shows within strings of text in a range within a sheet. Example: TA,MH in cell A2, CB,TA in cell C40, ES,TA in cell Q19. Result would be 3. Ideally, I'd like the formula to reference a cell that has TA as the look up data such as in A1 I'd have TA.

View 4 Replies View Related

Compare Text Strings In Two Columns And Return Text From Adjacent Cell

Feb 28, 2013

how to Chk the text string in particular cell, compare it with a super set column and get the full from of the text string from another corresponsing column and the output will be corresponsing full form of the chked text string?

View 6 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

Extract Multiple Text Strings From A Long Text String

Sep 4, 2009

An original text string entry appearing in an Excel cell would be:

"N7C Neuroprotective J5Z Antiviral, other M2Z Antiarthritic, other J5A Antiviral, anti-HIV"

I need to extract N7C, J5Z, M2Z and J5A from this string and list these alphanumeric values in separate cells adjacent to the original text string. The challenge is that these alphanumeric references may appear in different positions within the original string with no fixed value e.g. a "," separating them. The alphanumeric references may also be 3 or 4 characters in length and there may be different numbers of alphanumeric references in the original string.

Another example would be (very different from the first):

"T2Z Recombinant, other K5B Radio-chemoprotective J3Z Antibacterial, other D3A Vulnerary A10C Symptomatic antidiabetic K6Z Anticancer, other R8A Antiasthma B6A Septic shock treatment I1Z Immunostimulant, other S1Z Ophthalmological R8B Antiallergic, non-asthma M1A1 Anti-inflammatory"

You can see that in this further example "A10C" & "M1A1" are 4 character alphanumeric strings wheras the others feature 3 characters.

View 9 Replies View Related

Remove Part Of Text From Cells

Aug 19, 2006

I have a simple sentence in cells C3, D3 and E3. The sentence in C3 is:
Find Airfare to Chicago, Airline Tickets to Chicago, and More | XXXXXXXXX®

D3 contains: XXXXXXXXX highlights outstanding airfares to Chicago from quality airlines and agencies. E3 contains my list of keywords: Chicago Flights, Cheap Flights to Chicago, Cheap Chicago airline tickets, chicago flight, chicago airfare, chicago airline ticket, chicago airline tickets

The XXXXXXXXX in the C&D cells is the client name which I had to blank out in order to post here. I wasn't sure if you guys would need to know exactly how many characters there are in each cell. In column B3 is the name of the city, in this case the city is Chicago. I have 8000 destinations so I need a formula that will take the city (or any information) in the B column and replace that in the C, D and E columns in the appropriate place. I've attached a small, representative file to demonstrate.

View 6 Replies View Related

Replace Part Text In Cells

Sep 7, 2006

Is there a formula where it will find all that reads 07-06 and be able to change it to 08-06? Below are samples of formulas where I am looking to change 07-06 to 08-06 without having to go into each cell and manually changing 07-06 to 08-06:

= SUM(IF('07-06 data'!$C$2:$C$103="CAM",IF('07-06 data'!$I$2:$I$103="INCOMING - NEW",1,0)))

=SUM(IF('07-06 data'!$C$2:$C$103="MSP",IF('07-06 data'!$I$2:$I$103="INCOMING - NEW",1,0)))

=SUM(IF(('07-06 data'!$C$2:$C$103="CAM")*('07-06 data'!$I$2:$I$103="INCOMING - NEW"),'07-06 data'!$J$2:$J$103))

View 4 Replies View Related

Count Instances Of Part Cell Text In Range

Jan 21, 2008

I need a formula which I am using to count instance of sickness. I include a sample copy of my data which I hope will make my request clearer! I'm currently using the below formula to count the number of continuous instances of any code starting with "SICK" =(SUMPRODUCT((LEFT(C$10:C$37,4)="SICK")*(LEFT(C$10:C$37,4)<>(LEFT(C$10:C$37,4)))))

I would also like this formula to count any code starting with LTS as well (Long Term Sick). Due to the nature of sickness there may be continuous periods where both SICK and LTS codes are used, at the moment I can not come up with a formula to return the value I need. These columns may contain other codes but for simplicities sake I have only shown the relavent ones.

View 2 Replies View Related

Editing Using VBA - Find Text Strings In Text File

Dec 7, 2012

I have a large .txt file that I would like to edit using VBA. What I would like to do is to find each of the following text strings in the text file :

De:
De :
Envoye
A:
Objet:

If the character right before those text strings is not a carriage return (chr(13) then add a carriage return.

I would like the code to read each line in the text file and execute the task mentioned above.

View 9 Replies View Related

Extracting Strings Of Text From Columns Of Data(text)

Apr 23, 2007

What I have is a column of data(text) which contains amongst all the text three strings of text in ever cell in the column which I require copying into three adjoining cells

The data I require is :-

(a) The persons name which is always after the word ‘Requester’ e.g. Requester Steve Robinson

(b) Their office location which is directly after the persons name and is in brackets e.g. (Newcastle User)

(c) The Approving persons name which is preceded by ‘Approved by’ e.g. Approved by Christine Hunting

See examples 1 & 2 below

Example 1

CR0/CRZ3651 Requestor Steve Robinson (Newcastle User) Tel: 01234 798157 Approved by Christine Hunting

Please install and configure 2 Ultra 2s (typhoon and lancaster) for use as ARTE workstations. These workstations require Solaris 2.5.1 plus the same patches as before

Example 2

CR0/CRZ3118 Requestor Doug Cunningham (Newport User) Tel: 0114 9881480 Approved by John Smithers

Please provide support to set up Cisco 2691 Router and PIX-506E Firewall to enable external connection of a remote terminal for project work.

As you will appreciate the text in the cells is of non standard lenght and the three pieces of information can be located virtually any where in the text

View 9 Replies View Related

Return TRUE If Part Text Found In Cell Range

Feb 27, 2012

The formula has to include a range across each row (for each student). The formula has to search for specific text contained in the classnames, and then return the result along the same row.

Below is an example, which I hope saves OK in the thread. If not I'll upload an Excel file:

A B C D Results:-
1 class1 class2 class3 class4 Gg Hi Fr Sp
2 10m/Gg1 10m/Hi2 10m/Fr1 10m/En1 TRUE TRUE TRUE FALSE
3 10n/Hi1 10n/En2 10n/Sp1 10n/Ma1 FALSE TRUE FALSE TRUE

View 14 Replies View Related

Delete Row If Cell Contains Certain Text As Part Of Text String?

May 15, 2014

I have a column of data with letters in each cell, no numerical, only alpha. Now, some of those cells contain the letters "adj sub" as part of the text string in each cell. "Adj sub" is always at the beginning of the text string. As an example, a cell will look like this - "adj sub mhm". I want to delete rows whose cell description does not contain "adj sub" as part of the text in the cell.

View 5 Replies View Related

Sum Cells Based On Part Text In Other Cells

Jun 1, 2007

I want to add all of the numbers in column D if Column C contains the word "REMO"

View 4 Replies View Related







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