Countif With A Long Text String?
Jun 25, 2014
I'm trying to run a countif formula in a separate worksheet searching for a long text string. The text string is long enough that I can't copy the entire string into the Ctrl F Find function.
=COUNTIF('Data Month 1'!C:C,F4)
F4 = text string put together using the values of multiple adjascent cells. Total characters are over 26.
View 12 Replies
ADVERTISEMENT
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
Apr 17, 2007
I am trying to automate a report writing spreadsheet in which the text never changes in the cell (up to and over 50 words long).
Is there any way in which the figures within that text could be linked to another cell and change accordingly.
For example: a particular cell might contain the following which never changes apart from the figures:
"the performance of the fund was (B5) followed by a change in the index of (B6)...........the performance of the irish stocks was (A19) etc etc."
I know something can be done in formatting but for very long text would this be impracticle?
View 5 Replies
View Related
Jun 14, 2013
I have a bunch of these following below which I need extract text from the first "." from the right hand side.
The amount of text and "." can vary as does the number of characters.
XXXXXXXX.XXXXXX.XXXX.XXX.XXXXX.XXXXXXXXXXXXX.XXXXXXXXXX.Vibrating Screen SC409
XXXXXXXX.XXXXXX.XXXXX.XXXXX.XXXXXXXX.XXXXXXXXXX.Scalping Circuit 4
XXXXXXXX.XXXXXX.XXXXXXX.XXX.XXXX.XXXXX.Fines Stacker ST601
Ultimately i want it to display the following:
Vibrating Screen SC409
Scalping Circuit 4
Fines Stacker ST601
I have used LEFT, RIGHT, SEARCH, LEN functions in various combinations but cant get it to reference the last "." from the right.
View 3 Replies
View Related
Mar 27, 2008
I have a spreadsheet that has a column of text that is always 10 characters long. There are 10 rows of text so there could be 100 text characters if all rows are filled. The rows usually will not all be filled. There will probably be blank rows between used rows. I have been able to capture the text and put it into one cell as one long text which is ok but I want to be able to break it up into the 10 character strings again, separated with a comma and space between each 10 characters.
This is the code I used to collect the 10 character text strings and put them all together as the variable "result". I used & ", " after ... Cells(r,17) which worked fine unless there was a blank row. If the row was blank it put in a comma and space anyway so I ended up with duplicate(triplicate) commas and spaces.
Private Sub test_Click()
result = ""
For r = 5 To 32 Step 3
'If Cells(r, 17) "" Then
result = result & Cells(r, 17)
Next r
Range("r5") = result
End Sub
View 9 Replies
View Related
Mar 10, 2008
I'm currently working on a spreadsheet (see attached) which will have both numeric and text string data. This will be sorted by calender month and linked to another spreadsheet.
Could someone please list 2 functions for me.
The 1st would allow act like a filter allowing only data to be counted for a selected month from a drop down list.
The 2nd allows a counting of pre-set (drop down list) text strings to be counted.
Sorry seems a bit complicated and really I should have either a created a pivot report or used access but I'd like to continue with Excel for this exercise.
View 14 Replies
View Related
Oct 31, 2009
I need to add more arguments to a countif formula, but I have maxed out the 1024 character limit.
Is there another way of writing this formula or is there a way I can add more arguments to this formula.
Formula is:
=countif(A2:A9999,"AH")+countif(A2:A9999,"ARHC")+countif...
I have a list of the arguments, can I do something like:
=countif(A2:A9999,B2:B50)
(with the list of arguments in columns B2 to B50)
View 13 Replies
View Related
Mar 13, 2014
In a long string of characters and values, for example in B2:
Cos PGA 3.00 8.98 0.75 Cis TAK 1.00 2.99 0.25 Gsr PAM 14.00 41.92 0.82 Art GUN 3.00 8.98 0.18 Tlu NRG 9.00 26.95 0.33
I want to extract the second value after the specific string which is in in column headers C1, D1,E1...:
Art GUNCis TAKAxa MLPGsr PAMPen NMECos PGATlu NRGRot KGR
so for the example the result should be 8.98 in cell C2; 2.99 in cell D2; no value in E2; 41.92 in F2...
I attached a sheet with the table.
View 14 Replies
View Related
Dec 20, 2011
I have a very long string of characters inside one cell.
Now, I would like to divide this string into multiple rows and I know that next row should start after each 80 character. In other words, 81th character is a start of a new row.
How can I do that?
View 2 Replies
View Related
May 15, 2012
I've got a string of text (that can vary in length) and contains a date (could be any month)..
I'm trying to extract the date from the string using VBA.
For example, the string may be:
"The following price of the service is effective until July 1, 2012 and may change whenever"
I need to first determine if the string has a date in it and then extract the date....
I did a search on mrexcel.com and found the following formula that will tell me if the text has a date (returns true/false)...however, i'm not sure how to use this in VBA nor how to find location of date....
=SUMPRODUCT(COUNTIF(B1,"*"&N73:N84&"*"))>0
B1 contains the text, N1:N12 contain the name of the months....
View 9 Replies
View Related
Nov 5, 2012
I'm trying to use application.match() but I'm running into a issue where I don't know if I'll be matching a string or long data type...
Here's the snippet of code:
Code:
' UNIT DATA
' Set Unit#
s1 = ActiveSheet.Pictures(Application.Caller).Name
iLen = Len(s1)
s1 = Mid(s1, 2, iLen - 2)
' Set Sel Ex Work Date
iCheck = Application.Match("MACHINE_NUMBER", Sheets("Allocation").Columns(1), 0)
[code]....
How can I get application.match to look for strings if s1 = "ABC123" or numbers if s1 = "123456"
I've tried dim variant and s1 + 0... But, haven't come up with a solution.
View 4 Replies
View Related
Jan 17, 2013
I have some code which looks through a logfile, and creates new worksheets based on items found in a particular column. This is normally working fine. However, there is a particular case where the item in the column is too long - it is actually the path name of a particular file, and which exceeds 31 characters.
This is causing an error in VBA. Is there a way that the worksheet can be renamed if the character string is too long?
View 9 Replies
View Related
Sep 13, 2013
I have a google earth KML file that I have converted to text, and through a bunch of manipulation have been able to pull a series of GPS coordinate strings into a single cell string. Unfortunately, the string data is beyond what excel 2007 can handle for a single cell. so my thought is to have excel pull each coordinate string into a separate cell with which i can then run a macro to develop a new KML dynamically. (changing multiple attributes based on a query to a database)
Each string of coords actually maps out a single region (path) on the KML, truth be told it is telecom rate center data, and each rate center will have numerous other variables applied to it depending on my company's voice network capability for a given rate center. Currently my only desire is to depict differently any rate centers that I'm able to deliver VOIP services to by showing them in a different color...but these change very often so it will support to be able to auto generate the map from time to time.
the raw data from the KML looks like this:
Code:
CLINTONVL
RATE_CNTRCLINTONVL
STATEPA]]>
ff000000
1
0
1
[Code] ..........
After doing my data import, i extracted via various manipulations, the rate center name (a common lookup value that stays constant across multiple databases), and the string of coordinates. this is where i run into trouble. i need to pull each coord into a separate cell assuming i won't run out of cells in the x coordinates to gather this data OR find a way to grab the data via another lookup to another document...not desireable.
I want my output to look like:
Code:
RC_NAMECOORDSLATAVoip?
ALIQUIPPA
80.334114,40.520974,0-80.327493,40.520023,0-80.323915,40.51957,0-80.31997800000001,
40.519933,0-80.316958,40.521221,0-80.314431,40.521445,0-80.314262,40.521332,0-80.31398,
40.521194,0-80.31315600000001,40.520832,0-80.313057,40.520794,0-80.312805,40.520641,
[Code] ........
First off, my import was jacked up by missing some comma's...this i can fix easily with the string importation and manipulation HOWEVER...i still run into the issue of string length OFTEN.
View 1 Replies
View Related
Sep 27, 2013
I have two columns that read:
XXHSXX HR
XXTRXX MG
XXXFXX XG
XXHSXX HS
XXTRXX MG
XXMEXX RU
XXHSXX HR
XXHSXX
XXTRXX
XXTRXX
....
The above list represents 2 columns. The left column is 400 lines long. The right column is partially complete with 2 letter codes that represent the 6 letter codes on the right. I'm trying to convert the column in the XXYZXX format to a 2 letter column and each of those 2 letters corresponds to the 6 letter column on the left. How do I do this using any method or Vlookup? How does one convert a column of text to a corresponding column of text? I don't want to have to manually type in 2 letter codes that match up the left column. What do I do instead?
View 2 Replies
View Related
Feb 26, 2014
I'm trying to create a formula to return the number of cells where the last 8 characters of a cell end with the string "landline"
My (failed) attempt at creating this is as follows:
=COUNTIF RIGHT(A2:A322,8)="Landline"
View 8 Replies
View Related
Aug 19, 2014
I'm trying to enter text (a staff members initials) into an Input Box so that the initials are then used as the citeria in a CountIF formula entered by VBA
A simplified version of the code I am using is:
Dim staffname As String
staffname = InputBox(Prompt:="You name please.", _
Title:="ENTER INITIALS", Default:="MC")
Range("H9").FormulaR1C1 = "=COUNTIF(RC[-3]:RC[-1],"" & staffname & "")"
The issue is getting the staffname string to be entered within the formula.
What is the correct combination of "" & to enable this to work?
View 6 Replies
View Related
Oct 4, 2013
I have a long date and time text value in a cell such as "2013/10/02 07:43:39.39", where the fractions of a second are very important.
I can use cdate([text]) to convert the text string to a value, but only if i omit the seconds fraction: "2013/10/02 07:43:39".
Otherwise i get a type mismatch error.
Is there any way i can get the whole date/time string converted to a date value? The only way i can think to do it it at the moment is to convert the date/time, then divide the seconds fraction by 86400 and add the 2 values. Is there a better way?
Secondly, i have a large number of these date strings, typically >30k lines x 7 columns. Each string is preceded and trailed by a [space] character.
I can strip these extra spaces no problem. And, i can "loop" to perform it, again no problem. But it's going to take time to perform and i'd rather not if i can avoid it.
View 2 Replies
View Related
Jan 8, 2013
How do i separate example: #EM/13/10000749#JTDEl_1234#abc-NORTH#1##No Traffic Data into separate cells like 0749 to A1 , JTDEl_1234 to A2 , abc-NORTH to A4 , 1 to A7 , No Traffic Data to A5
And then continued with another text of the same standard to the next row by just copying from "Notepad" and pasting it in excel.
All the text is following the same standard.
Example :
#EM/13/10000749#JTDEl_1234#abc-NORTH#1##No Traffic Data
#EM/14/10000730#JTDEl_1256#abc-SOUTH#3##No Connection
#EM/09/10001683#JTDEF_5674#abc-EAST#2##Low Data
View 2 Replies
View Related
Jan 29, 2010
Is there a work around to pull data from cells in excel to another tab with standard language? For example the template language will stay the same except in example A's case the last sentence "0.0" hrs will vary based what's sitting in B34.
It's stating the formula is too long. Is there too much text?
Sometimes the link would be in the middle of the text as shown in example B below with dates 00/00/00.
EXAMPLE A
For any leave of absence that is granted for more than 10 days, time off is governed under the Disability Bank Policy. Under the Disability Bank Policy there is a 10 day elimination period which must be satisfied prior to gaining access to your disability bank. During this 10-day elimination period, you are required to use your sick time for the first 6 days (48.00 hours) and vacation time for the remaining 4 days (32.00 hours). After this elimination period, we use all the time accrued in your disability bank. Currently, you have a disability bank balance of "00" hours.
EXAMPLE B
After this disability bank is exhausted, you will use all remaining and future paid time off balances from your vacation/CME/holiday banks. Because your leave begins in 00/00/00 and ends in 00/00/00 we will advance you future paid time off balance thru 00/00/00. Once those balances are exhausted the remainder of the leave will be unpaid. Per our policy, should you not return to work, you agree to pay back any time advanced to you within 30 days of your separation from the company.
View 9 Replies
View Related
Aug 9, 2006
I have a range of numbers stored as text. I need to convert them to long numbers using vba. I tried typing a simple number = clng(a2), but that didnt work. Can someone help me with A) the right formula and B) the proper end(xlUp) format.
View 9 Replies
View Related
May 28, 2014
formula to find specific text from statement.
I manage to use formula find for 1 text in 1 statement, but in confuse how to get another text found if i have "8 text" to find. Generally, there will only be "1 text" for each statement.
Maybe in 1 statement there have only "IC" or "Staff Tagging" or Name" or "Product" or etc till 8.
View 8 Replies
View Related
Jan 9, 2014
I have an issue with long numbers (16 digits). To display them correctly in excel I formatted the cells as text. This part works fine, but now for some reason conditional formatting marks different numbers as duplicates.
In my case 3081281170122602 and 3081281170122601 are considered as duplicates by excel.
See the file attached. duplikaat.xlsx
View 4 Replies
View Related
Feb 22, 2010
Attached is the mock excel spreadsheet. I want to read "sam" from the lookup column's long text "sam is good" and then write "4" in the next column. Similarly read "white" from the long text "white is tired" and write "1". And so on,,,,, For more criteria, see box highlighted in yellow,,,,I used VLOOKUP but what am able to make it work only when there is one word "sam" in the lookup column. It returns #NA when the text is "sam is good". It should write nothing if none of the criteria is met and should keep doing until the last cell in the lookup column.
View 3 Replies
View Related
Mar 11, 2007
I have a user form and to input the hourly wage i need to convert the text entry to a number whose type is LONG and not integer.
Does anyone know how to do this?
Or is there a way to input a number in a userform without a text box entry?
View 9 Replies
View Related
Jan 31, 2008
Find a short text string in a column of longer text strings and when that short text string is found return the longer text string that matches.
View 3 Replies
View Related
Dec 18, 2013
Is there a way to do a COUNTIF on just partial text?
I know how to count how many cells in a column contain the text "cars" for example, but how would i write a formula that include cells with other text as well?
For example if 55 cells have "cars" as a value and 20 cells have "fast cars" as a value
I would want the formula to count 75.
Basically, it needs to count how many cells cars appears in, in a specific column, regardless of whether its alone in the cell or part of a sentence.
View 11 Replies
View Related
Jul 1, 2009
I am using countif to count a range of cells D10:D34 returning a PB as a result of a formula in Col D.
The countif formula (=Countif(D10:D34,"PB") is in cell D39 and the result in D39 populates a cell in another worksheet. The formula in Col D also returns =PB results. I have placed another Countif formula in cell D41 (result to also populate a cell in another worksheet) to count all =PB's using (=Countif(D10:D34,"=PB"). The second countif doesn't work correctly. It counts all PB's and =PB's.
View 2 Replies
View Related
Oct 23, 2007
How would I write a formula to Countif or Sumif a cell contains a string of text? ie if I wanted to look for "Andrew" in cells that contained the text "AndrewKent", "Andrew Kent", "Kent Andrew" etc how would I do it?
View 9 Replies
View Related
Jul 9, 2014
I have a set of task descriptions that I am attempting to trend on. Some of these (Column B) have the customer's name added to the description; others do not. I need to be able to make a list of task names (ColumnA), removing the name from the text string.
The formula I am using is [=LEFT(B3,FIND("for",B3)-2)].
The problem I am having is when the description does not contain the "for" built into the formula, I get "VALUE" error. What adjustment can I make to the formula to pull over the Description if the "for" does not appear in the text string?
View 3 Replies
View Related
Jun 29, 2014
I need to create a macro to do the following:
Search the activecell for a text string (a), and then either paste in text string (b) at the end of the cell if (a) is found, or text string (c) if (a) is not found.
For example, if the activecell has "AA/" in it, I want the cell to become "AA/01" (pasting in "01" at the end), and if the cell has just "AA" in it, I want it to still become "AA/01" (pasting "/01" at the end). The macro will be linked to a commandbutton.
View 7 Replies
View Related