UDF To Convert String To Abbreviation?
Mar 18, 2013
I would like to have a UDF to convert any text string to an abbreviation. For example, "Del Puerto Creek at HWY" would be converted to DPCAH. Or "this text string" would be converted to TTS. This has to work on any string of any length in any cell. I guess the UDF would pass each character through a loop and extract the letter immediately after a space and capitalize the letter if it is not already in uppercase. The UDF would have to have the ability to drag using relative references. For example: =AbbrevTxt(A1). It does not matter what the UDF is named.
View 3 Replies
ADVERTISEMENT
Nov 13, 2008
I've inserted the current date into an excel form using the TODAY() function.
I also need to provide the form in French, and when I change the language for the cell with the TODAY() function, it automatically abbreviates the month. For example, today's date appears as "13 nov. 2008" rather than "13 novembre 2008" as I would like it to appear.
Any ideas on how to change this?
View 8 Replies
View Related
Apr 20, 2014
I have the need to create a workbook that will return values based on the entering of an abbreviation. I will use the chemical elements as an example, I wish to have a column formatted so that if 'Au' is entered the cell populates with 'Gold' or if 'Pb' is entered then the cell is populated with 'Lead'
So in my case I have all the abbreviations in one column and all the full descriptions in another (approx 500 different codes/description)
View 3 Replies
View Related
Dec 21, 2006
My workbooks have a column of state names that I need to replace the names with abbreviations. I am doing it manually with the Replace (Ctrl+H) right now, and it's very time-consuming since I'm doing it with numerous, large workbooks. I would be very grateful if there's a quicker solution. The state column is always the same (I). The states are United States and Canada, but I could edit if there's an existing solution from a different country, or modify a simliar work-around.
View 6 Replies
View Related
Aug 8, 2007
I want to be able to create shortcuts for cells by using abbreviations. i.e If I wanted a cell to come up as "Food Services" all I would have to do is type in "FS" rather then the entire word or continually using copy/paste for the various abbreviations. Is this possible through excel or would it be best to be done through ms access?
View 4 Replies
View Related
Apr 24, 2013
I have a list of abbreviations in Sheet 2 and Names of Companies (Full name of Company and short name) in Sheet 1.
What I need to do is check if the abbreviation used in the Short Name Field in Sheet 1 is correct based on the given abbreviation list in Sheet 2.
here is the example:
Sheet 1:
Fulll Name of Company
Short name
AMERIPRISE FINANCIAL, INC.
Ameriprise Fin
Sheet 2: Abbreviation List
Full Version
Abbreviation
Academic
Acad
Bank
Bk
Financial
Finl
in the abbreviation list the correct abbreviation for financial is Finl so the short name should have been "Ameriprise Finl" and NOT "Ameriprise Fin". I'd like the rows highlighted in yellow if it is incorrect.
View 9 Replies
View Related
Aug 2, 2013
I have a field in the format of 121031. I need a formula to convert this field to a date DD/MM/YYYY format, so 121031 becomes 31/10/2012.
View 9 Replies
View Related
Mar 27, 2009
I have a string variable (myCell) that contains a cell address (i.e. $A$66)
I have a Range variable (mrR1) that I want to give that value to.
I cannot figure out how to do it. Can anyone help?
After that, I'm hoping to use the Range variables in a Goal Seek.
Private Sub CommandButton1_Click()
Dim myMatch As Double
Dim myCell As String
Dim myStart As Range
Dim myIRR As String
Dim myR1 As Range
Dim myR2 As Range
myMatch = WorksheetFunction.Match(0.25, Range("K67:DZ67"))
myCell = Range("HurdleStart").Offset(0, myMatch).Address
myIRR = Range("IRRStart").Offset(0, myMatch).Address
' myR1 = myIRR value
' myR2 = myCell value
Range(myR1).GoalSeek Goal:=0.25, ChangingCell:=Range(myR2)
End Sub
View 9 Replies
View Related
Apr 1, 2009
I'm working in Excel 2003. Is there a way to convert strings to Ranges on the Excel commandline?
I have a lookup function in an estimate sheet that uses 2 ranges, stored as strings, in another worksheet. They are used to return a price from another workbook. When I use named ranges to access them with the lookup function, it doesn't work. But when I cut and paste the strings into the commandline it works prefectly?
$A10 = Part Number to search for
MaterialOptions is a named Range
eg: '[Catalog.xls]PriceList'!$A$13:$A$17
PriceOptions is a named Range
eg: '[Catalog.xls]PriceList'!$Z$13:$Z$17
LOOKUP($A10,MaterialOptions,PriceOptions) = #VALUE!
But...
LOOKUP($A10,'[Catalog.xls]PriceList'!$A$13:$A$17,'[Catalog.xls]PriceList'!$Z$13:$Z$17) = Success!
View 9 Replies
View Related
Mar 12, 2014
I have a spreadsheet with reference relating to dates that are listed as single days. I am trying to convert the single dates relating to a reference to a from and to date but i'm having problems.
Example
048051_14110/09/2013
048051_14111/09/2013
048051_14112/09/2013
048051_14113/09/2013
041929_14115/10/2013
041929_14116/10/2013
041929_14117/10/2013
041929_14118/10/2013
I want this to read
048051_141from - 10/09/2013 - to - 13/09/2013
041929_141from - 15/10/2013 - to -18/10/2013
View 1 Replies
View Related
Aug 23, 2009
My database has 6 fields names and I have created the following code to capture and post data to the database form a userform. It works but I am sure there is a more efficient and elegant way to do this. The two areas I would like advice are:
1. converting the date string to a date.
2. the line of code where I subtract line6 from line4.
View 3 Replies
View Related
May 3, 2013
The following function reads many worksheets in one workbook and put the information into one worksheet. F22 to Q22 is dates in the format of mmm-yy on the many worksheets. On the one worksheet B1, C1, D1, etc... is dates also formatted mmm-yy. Now the many sheets only have a 12 month period but could be any date within 60 months. In the many worksheets the beginning date in F22 is based on the date that is entered into G8 of the many worksheets. The function is:
Code:
Function HrsByMonth(strField As String, MonthNum As Integer) As Long
Dim sht As Worksheet, i As Long, j As Integer
HrsByMonth = 0
[Code].....
View 6 Replies
View Related
Feb 16, 2014
I've got an odd program that exports time data formatted as a text string. For example....
0:10:25
Since it has no numerical value, then I can't simply "format as number". I'm thinking that I will need to use one of the string methods eg: mid() to check each character individually and then convert that into the equivalent numerical value.
So the numerical output I am looking for in the above example would be 625.
View 2 Replies
View Related
Apr 11, 2007
I do not know if this is possible in VBA, but I am hoping it is as it will make my life much easier.
Is it possible to say have a TextBox and a CommandButton, that does the following?
Public Sub Execute()
Dim ObjectName As String
Dim Object As Object
ObjectName = txtObject.Text
Set Object = ObjectName
Object.Execute
End Sub
Or to take it a step further:
Public Sub Execute()
Dim ObjectName As String
Dim FunctionName As String
Dim Object As Object
ObjectName = txtObject.Text
FunctionName = txtFunction.Text
Set Object = ObjectName
Object.FunctionName
End Sub
Are there any inbuilt functions that will create/reference an object based on a string containing the name of the object or function?
View 9 Replies
View Related
Dec 18, 2009
I am trying to convert a number string date that has been stored in a database to a readable date time in an excel pivot table.
1260983366 needs to look like Wednesday, December 16, 2009, 10:09 AM.
The converted date could also look like Wed, Dec 16, 09, 10:09 AM.
View 9 Replies
View Related
May 18, 2007
How can any string valid for the name of a workbook be converted to a string correctly recognized by Application.Run? Sometimes a string is not really recognized as a string. See for example: .....
View 9 Replies
View Related
Nov 16, 2009
I'm trying to wrtie an IF statement to display one of Q1, Q2, Q3 or Q4 based on the three letter month abbrev. All i have so far is the following, which isn't leading anywhere - and i have a feeling theres an easier way to write it.
=IF(((OR(G2="Jan","Feb","Mar"),)),"Q1",""),IF(OR(G2="Apr","May","Jun"),"Q2","")
View 9 Replies
View Related
Nov 7, 2008
Say I have a string "09800EBHR052708"
How would I take the first 5 characters and get a number out of them?
View 14 Replies
View Related
Mar 7, 2013
I got a list of counties in Texas, but the list is in mixed case and always has a " County" after each one. I got it converting to upper case, and have tried removing the " County" but no luck. Below is the code I have:
Code:
Sub TEXAS()
For a = 1 To 254
R = "D" & a
i = "a" & a
ActiveSheet.Range(R) = UCase(ActiveSheet.Range(i))
Next a
End Sub
View 7 Replies
View Related
Aug 13, 2013
I have a date range that looks like this (British date style, not US):
edit: I posted an image but it can't be seen for some reason:
Date Range
2010 11/10 17/10
2010 11/10 17/10
2010 11/10 17/10
2010 11/10 17/10
Thus the first cell show 11 October 2010 to 17 October 2010 I want to return just the first day (the week commencing date):
edit: I posted an image but it can't be seen for some reason:
Week Commencing
11/10/2010
11/10/2010
11/10/2010
11/10/2010
I have written some VBA to the best of my ability but it seems clumsy using the FORMAT function. Is there a better of doing this with VBA. I can't seem to find a function in VBA which is the equivalent of the formula function DATE.
Code:
Sub ConvertTextToBritStyleDate()
' dd/mm/yyyy (not mm/dd/yyyy)
' Select the cells containing the dates (not the header)
[Code]...
View 3 Replies
View Related
Mar 30, 2014
The following macro works:
Code:
Range("b42").Resize(, Len(Range("A42").Value)) = split(StrConv(Range("A42").Value, vbUnicode), Chr(0))
I tried to revise the macro so that instead of 'b42' it's activecell.
Code:
Dim b As Range
Set b = ActiveCell
Range(b).Resize(, Len(Range(b).Value)) = split(StrConv(Range(b).Value, vbUnicode), Chr(0))
My code isn't working.
View 2 Replies
View Related
Jan 10, 2013
If n = 5, then I want to generate a string like this: "1+2+3+4+5". Similarly, if n = 7, I want the string "1+2+3+4+5+6+7".
I can generate the consecutive numbers, but have not figured out how to generate the required string.
View 5 Replies
View Related
Sep 28, 2012
Is there a way to convert the string "Sep 28 2012" to excel date format using a formula or vba?
View 8 Replies
View Related
Nov 17, 2009
Convert the first letter of a string to a capital without altering the rest of the strings format.
example: the activecell contains the string a1st (lowercase a, superscript 1st)
how can i achieve this in VBA?
Additionally, is it also possible to convert all of a string to capitals except the superscript characters
View 9 Replies
View Related
May 18, 2007
I have something like the following:
If Worksheets("RawData"). Cells(1, nColumn).Value = Worksheets("RawData").Cells(12, 16).Value Then
..do code (I know the cell location of interest at this point)
End If
Then I End up needing To Do something Like the following
ActiveChart.SeriesCollection(1).XValues = _
Worksheets("RawData").Range("L1:N1")
“L1:N1” above is a sample. Given the code above it I have the cell location in question but it is in the format such as .Cells(12,16). That doesn’t do me much good when range wants something like “L1”. I don’t know how to convert that (12,16) to a L16 for example.
View 7 Replies
View Related
Jan 10, 2013
If n = 5, then I want to generate a string like this: "1+2+3+4+5". Similarly, if n = 7, I want the string "1+2+3+4+5+6+7".
I can generate the consecutive numbers, but have not figured out how to generate the required string.
View 2 Replies
View Related
Jun 3, 2012
I'm trying to create an array formula that returns all the cities in a given state by imputing the state's abb in cell K2. The returned cities go into column J. California has the most cities(430) and the cities are 5000 rows deep.
View 7 Replies
View Related
Oct 19, 2012
I have a spread sheet with a date colume that reads: 2012-06-27-19 I need to have this read like 06/27/2012 but nothing I do is working I have tried to go to the formatting process and backing the hr:mm out and that doesn't work. I really don't want to go line by line to manually correct this issue.. HENCE ... over 2000 lines
Second question: If I have a column that reads 02/15/2012 and another column that reads 3/27/2012 how to a format a 3rd column to make it read total number of days between 1st date and 2nd date?
View 1 Replies
View Related
Jan 30, 2014
I have a large database from a central appraisal district. In the database the city is stored as a numerical value. The problem is I need to convert the numerical value for the city to a text string with the actual city name. For example the values to the attached example database are as follow:
excel help forum 2.xlsx
024 = Hurst
026 = Fort Worth
025 = Euless
017 = Mansfield
013 = Keller
The issue is, I need to convert this column of numbers into the string of the actual city name. Is there some type of command, or macro that I could use to automate this process? Attached is a small example copy of the database.
View 13 Replies
View Related
Jan 17, 2012
I have these as input entered as text:
January 01, 2011 January 01, 2011 February 28, 2010 May 12, 2011 June 02, 2010 February 28, 2010 May 12, 2011 June 02, 2010 February 28, 2010
but I need it in this DATE format:
MM/DD/YYYY
I need it as a formula to be entered into a cell in excel (not VBA)
View 9 Replies
View Related