Extract Date From Varying Text
Feb 14, 2008
I am trying to extract dates from text strings of varying lengths. The date may appear anywhere in the string. The dates are all 8 characters, in the mm/dd/yy format.
For example:
12/12/2007 is the date in this string.
There is a date of 12/12/2007 in this string.
The date in this string is 12/12/2007.
View 3 Replies
ADVERTISEMENT
Jul 9, 2007
I have a column of data that contains suburb, state and postcode (zip code). I can extract the postcode quite easily using:
=RIGHT(H2,4)
However, sometimes there is one word for the suburb, and other times there are two or more words. Also, the state abbreviation contains either two or three letters:
MARYBOROUGH QLD 4650
BRAY PARK QLD 4500
TEA TREE GULLY SA 5091
Does anyone know of any code I could use to extract the three pieces of information into three new columns? (I.e. Suburb, State, Postcode)
I imagine the formula would contain some method of counting the number of paces; however, the number of spaces between each word may be more than one space.
View 9 Replies
View Related
May 24, 2014
a formula to extract the numbers into two separate fields. The text may vary in length and the numbers vary in length also from 1 digit to 2,000,000.
Data in A1 is as follows:-
Meter reading Old:1345 New:67890
View 9 Replies
View Related
Mar 27, 2013
Extract data with differing date formats that I need to convert to something consistent that I can format as a date.
This is an example of data.... all with general format at the moment.
2/28/2013 2:48:53 PM
1/16/2013 10:48:50 AM
12/17/2012 11:59:49 AM
I have used this formula to extract the date portion, but I can't get this to then format as date. How do I convert this to the julian date, so I can then apply a date format?
=LEFT(G9,SEARCH("/",G9)+7)
(The day portion of this date always has a leading zero).
View 9 Replies
View Related
Jul 19, 2014
I am using Excel 2013. Anyway, the first issue is that I need to pull a date and a time period from text. So, for example, if I see something like Sunday Prime Time 7/6/14 8:37PM, I would want to pull ONLY the "7/6/14 8:37PM" out of it. Each text box could potentially be different, so it might not always be in the same format as "Sunday Prime Time 7/6/14 8:37PM" it might only show just the date and/or the time without all the extra text i.e. 7/6/14 8:37PM. Some of the cells will have text, others might only have just the time or even just the date and the time. The only thing that I am worrying about in each cell is extracting just the date and time. If this is too much to ask of excel, I would be ok with extracting ONLY the time - 8:37PM and not the date, but I would much rather be able to get both the time and date.
THEN, onto part two of my question. After I would pull the dates and times, I need to compare them with each other. So, when I have the same date with two separate times on that date, I need to write a formula to show if those times on that date are less than 30 minutes apart. So, if I have 6 times on 7/6/14, I need to know if any of them are less than 30 minutes apart.
I would need to have the formula say something like "Problem" if the times on 7/6/14 would be 5:30PM, 5:48PM, 7:00PM, 8:00PM, 8:15PM, and 9:00Pm for example. I would like to see the word "Problem" since 5:30PM and 5:48Pm is only 18 minutes apart, and "Problem" after 8:15PM since that is only 15 minutes past the 8:00PM which is obviously under 30 minutes. The times that are more than 30 minutes apart such as 7:00PM and 9:00PM for example are more than 30 minutes apart from any of the other times that were extracted.
View 7 Replies
View Related
Dec 26, 2013
Any formula that can extract from a time stamp text string, which looks as follows: 7/8/2013 7:10:33 AM.
The tricky bit is saying anything before the first "/" represents the month, anything between the 1st and 2nd "/" represent the date, and the 4 digits after the second "/" represents the year.
View 9 Replies
View Related
Dec 15, 2008
I have some dates with text, I want to extract dates from the text. Here is an example.
Sheet1
AB1ORIGINALI WANT2PREVIOUSLY CAPITALIZED 3Capitalize 09/05 per FMS 9/30/20054Capitalization date 11/05 11/30/20055PREVIOUSLY CAPITALIZED 6Capitalize 12/05 per FMS 12/31/20057Capitalize 08/05 per FMS 8/31/20058PREVIOUSLY CAPITALIZED 9Capitalize 09/05 per FMS 9/30/200510Capitalize 12/05 per FMS 12/31/200511CAPITALIZE 12/2006 12/31/200612PREVIOUSLY CAPITALIZED 13PREVIOUSLY CAPITALIZED 14Capitalize 09/05 per FMS 9/30/200515Capitalize 03/05 per FMS 3/31/200516Capitalize 12/05 per FMS 12/31/200517PREVIOUSLY CAPITALIZED, CAPITALIZE 12/06 12/31/2006
Excel tables to the web >> Excel Jeanie HTML 4
View 9 Replies
View Related
Oct 19, 2010
I have a column of times, that are actually dates of 1/0/1900 plus time, from which I want to extract the AM or PM status. I can format it to show this, but it's really just a fraction of a day. I need the actual text "AM" or "PM", not a decimal value.
Is there a formula to do this?
View 9 Replies
View Related
Aug 9, 2007
i currently have a table/template in which external data is pasted... however there are 2 colums titles DATE and START TIME (amongst others) now although where the data is pasted from the information is in the correct format. After the information is pasted both the columns have exactly the same information in them. I'm pretty sertain the only reson for this is that the source the records/data actually comes from formats them on the screen differently to how the records are stored on the database using code....
so after the expanation which hopefully made sense is there any way i could convert a record like this
Thu Jun 28 21:54:33 GMT 2007 (this is how the information is pasted into the 2 columns)
to both
28/06/2007 for the DATE column
and
21:54:33 for the START TIME column
the cell format makes no difference because the information is both text and numbers....
View 9 Replies
View Related
Mar 27, 2014
Lets say I have a wall of text that looks like this, all of it in 1 cell.
[Code] .....
What formula do I use to extract the latest date from this string? In this example, the ideal result will be 02/05/2014 .
View 5 Replies
View Related
Nov 8, 2012
I have a column with the following values:
SubmitDate
November 8, 2012 1:37:07 PM GMT+05:30
November 8, 2012 9:32:03 AM GMT+05:30
November 8, 2012 4:32:54 AM GMT+05:30
November 7, 2012 10:28:11 PM GMT+05:30
November 7, 2012 8:36:43 PM GMT+05:30
November 7, 2012 6:33:13 AM GMT+05:30
[code]......
I need another column, with just the month specified there based on above dates, so that I can manipulate the complete sheet further using a pivot. Some formatting issue isn't allowing me to use month() function, to derive the month of the date mentioned in the cell.
Using Auto-filter is too tedious, since I'd have to do it 12 times to cover each of the month. Tried recording a macro, but that too isn't supporting much, since it gets specific to cells and hence isn't re-usable in another sheet with similar data.
How can I automate the task of extracting just the month from the above column?
View 4 Replies
View Related
Mar 23, 2007
In Cell A1 Value is: 20070322_023047_002035_1112223333
above code is like Date(YYYYMMDD)_Time(HHMMSS)_Agent#_Phone#
I want result As per Following:
In Cell B1: 03/22/2007 Date(MM/DD/YYYY)
In Cell C1: 02:30:47 Time([HH]:MM:SS)
In cell D1: 002035
In cell E1: 111-222-3333
View 10 Replies
View Related
Jul 16, 2009
I have a cell with the following text in it that is being imported from a website "5/1 Smith T win". What i want to do is extract the "5/1" part without it being in the format of a date. I want it to be extracted in the format "?/???". I have entered the following formula to extract the "5/1"
View 2 Replies
View Related
Jul 2, 2007
I need to find text within middle of a string.
Character before required text is say AAA
Character after required text is say BBB
Text required can vary in length.
Extract text and place in another column.
All text in a single column, required text not in every line. but
does repeat.
View 9 Replies
View Related
Aug 7, 2013
I am attempting to have cells in Column 'U' deliver different drop-down menus based on the corresponding value in column 'D'. I have created 7 named lists:
List_117G
List_152
List_JMET
List_XBAND
List_PACWIND
List_VORTEX
List_ROVER
Those lists will be called up based on 7 values in column “D”:
“G”
“152”
“J”
“X”
“D/E”
“V”
“R”
So far I have only been able to get this to work for the first category “G”. When I change the value of column “D” from “G” to “152” I no longer get a drop-down. Here is the formula I am using in the List function of validation.
=IF(D6="G",List_117G,IF(D6="152",List_152,IF(D6="J",List_JMET,IF(D6="X",List_XBAND,
IF(D6="D/E",List_PACWIND,IF(D6="V",List_VORTEX,IF(D6="R",List_ROVER,)))))))
View 2 Replies
View Related
Jun 28, 2012
There are 11,000 rows and 4,000 are unique. The goal is to merge the data down to the 4,000 records. Each of the unique entries shows up 1 to 15 times.
In trying to solve this, I wonder if I should break this down into the different # of occurances and implement specific solutions. e.g., There are
5700 entries that show up 2x
504 that show up 3x
24 that show up 12x
View 3 Replies
View Related
Oct 2, 2013
I want to call a macro with a varying name that is within a module with the same name.
I have a module called Test1 and within this, a macro name called test1
I have a module called Test2 and within this, a macro name called test2
etc
On another module called Test8 (with the macro called Test8), this Test8 macro will call either Test1 or Test2 or Test3 etc depending on what I choose in an excel spreadsheet. So on sheet1, cell A1, there is a drop down with the options Test1 or Test2 or Test3 etc.
The following works to run the macro test1 from module test1 (when it does not vary i.e. i physically put in the name of the macro myself):
Sub Test3()
Test1.Test1
End Sub
The following works to run the macro test2 from module test2 (when it does not vary i.e. i physically put in the name of the macro myself):
Sub Test3()
Test2.Test2
End Sub
etc
However, if I try it so that the calling of the macro varies as below , it does not work:
Sub Test3()
MacroToCall = Sheets("Sheet1").Range("A1").Value
MacroToCall.MacroToCall
End Sub
View 7 Replies
View Related
Jul 2, 2008
What I'm trying to do is sum the daily interest of a loan for any range of dates. Imagine this example:
1) In column A you have dates from 01/01/2009 through 12/31/2059, with each individual day showing, so literally thousands of cells.
2) In column B you have just random values corresponding to each date, such as $100,000 on 01/01/2009, $139,000 on 01/02/2009, $52 on 01/03/2009, and so forth. These values occupy as many cells as the dates, i.e. there's a cash flow (value) for every date.
3) I want to run a formula in column C that will sum a date range I specify. For example, if I want to sum all the daily values for each month (i.e. the 1st through the 30th), or if I want to sum all the daily values for the 15th of a month through the 14th of the following month. In other words, the loan can start on any date, and I need to sum the interest for each "monthly anniversary."
4) I'm thinking that the formula will have to be different to sum an actual entire month. For example, formulas to sum from, say, the 15th of one month through the 14th of the next month, or the 10th of one month through the 9th of the next month, might be similar.
However, as there is a varying number of days in most months, that formula might not work (though I might be misunderstanding myself) when trying to sum the values for an entire month, i.e. February 1st through 28th. I think it might be solved by some sort of "if," such as if day = 1, then sum whole month, otherwise some from date through same date of next month less the last date's cash flows?
View 9 Replies
View Related
Oct 12, 2012
I am trying to run a VLOOKUP that allows me to reference all text (which can vary in length) in a cell up to the first '' from the right of the string. Also note that the master table of data being retrieved from is in another workbook. For example:
TestSalesDealsPlans - I just want to reference Plans (5 characters up until but not include '')
TestSalesDealsOrder Management - I just want to reference Order Management which obviously has more characters than the above example 'Plans' (16 characters up until but not include '')
I am fairly certain I will need to nest several functions such as RIGHT, VLOOKUP, MATCH, INDEX, etc but just not sure the most effective way to go about this.
View 4 Replies
View Related
Dec 6, 2013
I have figured out certain formulas that can get me pieces of the text substring, I am having difficulty finding an all in one solution that will allow me to run a macro and automate this process due to the nature of variability of the # of characters in the text string. The category and what I need to extract is as follows (Michigan Missing Zips roll up I can deal with):
MWR - Illinois - HORIZONTAL LATHES
MWR - Illinois
MWR - Illinois - MACHINING CENTERS - HORIZONTAL & OTHER
MWR - Illinois
MWR - Illinois - MACHINING CENTERS - VERTICAL
MWR - Illinois
[Code] ..............
View 3 Replies
View Related
Sep 11, 2009
I need to determine a formula which will allow me to calculate a future date based upon a current date with varying time periods.
For example:
I have a bill which is paid on the 15th and last business day of each month. I would like to be able to see the next due date regardless of what day of the week it is.
I have a bill which is paid every other Tuesday. I would like to know the next due date without having to enter +14 for every due date in the future. In other words, it is preferable to be able to open the spreadsheet and automatically see the next due date, not use autofill to repeatedly add +14 to a previous date which would limit the # of future due dates that could be calculated.
I have a bill which is paid on the last business day of each month, not the last Friday of each month. I would need excel to return a value for the last day of the month which = Monday-Friday, regardless of what day of the week it may be as long as it isn't Saturday or Sunday(holiday exclusion would be nice but not required).
View 14 Replies
View Related
Mar 9, 2014
i have several styles to handle mentioned under different rows separately.
all the styles have their various raw materials inward date mentioned under different column of their respective rows from column Q to Y
now i need to 1. extract the latest date of any particular raw material which can be in any of column from Q to y columns ACCORDING TO DIFFERENT STYLES IN A Particular row automatically that is AC
View 1 Replies
View Related
Jan 17, 2010
I have two questions regarding date format and hope you can provide input.
1) say 01/01/2010 displays as Jan-10 and i need a new column to state it as JAN. What function should i use to achieve it?
2) i need to state the difference between first day and last day of the month. What function should i use to achieve it?
View 2 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
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
Mar 12, 2014
I am trying to extract numbers after a specific text in a text string, for eg :abc SN 12345 xyzedf SN No. 456 mnoAs per above, i want to extract any numbers afters "SN". the numbers can be vary in digits i.e. it can be 3 digit numbers or 4 or 6. Also, at times there is some other text in between (like SN No.) numbers and search word (i.e. SN)Any formula to get result as "12345" and "456".
View 5 Replies
View Related
Jun 22, 2006
I had VBA run a third-party program ("HYD") using data listed in my spreadsheet. HYD produces a textfile and I want to extract a number from that log (line 58, columns 6-10 to be exact).
I started with
Open "C:TempHYDLOG.TXT" For Input As #1
but I don't know how to have it skip down to line 58 or which function to use to extract the number I want. I've read through tons of help files and forums but none of them treat anything as simple as scrolling down to specific lines.
The entire subroutine up to that point is as follows: ....
View 4 Replies
View Related
Jul 22, 2009
Once a week I recieve a data file from another department and their report shows the period starting as well as ending but in text format all in one cell.
How can I extract the two dates to show the srart date in one cell and the end date in another. The example that would arrive in cell A1 is:
Reporting Period: 01/01/2009 00:00 to 07/05/2009 23:59
The hours and minutes do not matter.
View 9 Replies
View Related
May 9, 2014
Every week we produce a report that has the filename: Master_BER_Pending Revokes Report_YYYY-MM-DD.xlsm
Some of the information from this workbook needs to be pasted into a new tab on a different workbook. The new tabs naming convention is simply "DD MM". Currently I've got a command prop that asks the user to enter it in manually. See below
VB:
Dim newsh As String
newsh = InputBox(Prompt:="Enter new tab name", Title:="Tab Name", Default:="e.g. '05 05'")
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Select
ActiveSheet.Name = newsh
The user gets the information for the month and day from the filename of the report that was produced. What I need is the DD and MM to be extracted from the filename and used to name the new sheet.
View 6 Replies
View Related
Jul 8, 2014
In cell A1 i have a drop-down list.
In this list are the following:
London [S] (14/02/2013)
Rome [W] (23/10/2013)
Tokyo [W] (17/01/2014)
Berlin [A] (24/02/2014)
...and so on...
In cell B1 I would like to extract the currently selected city name and the [?] (e.g. "London [S]")
In cell C1 i would like to extract the currently selected date (e.g. (14/02/2013)
View 6 Replies
View Related