I have been using the following formula's to trim some information that's separated by a colon, such as Pioneer Clinic:Dave McAfee...so that I have a column with Pioneer Clinic and a column with Dave McAfee:
However, now some of my data is separated by two colons! AVM:Pioneer Clinic:Dave McAfee. the formula for separating this so I still have two columns of Pioneer Clinic and Dave McAfee?
Is it possible to modify it so that it only triggers if there is nothing after the last colon?
As you can see in the example below I have some notes entered by users and I would like to delete the ones where they didn't actually enter a note after the last colon:
11/05/2012 13:19:53 NEW MIKE : cld poe male sd cu not in till 3pm 10/18/2012 08:03:55 NEW HOSSEN : called no answer 10/15/2012 11:15:41 NEW HOSSEN : 10/12/2012 08:00:26 NEW HOSSEN : 10/11/2012 12:17:14 NEW HOSSEN : called no answer 11/14/2012 13:42:07 ACT MIKE : cld poe spk to cust sd cm back at 330
I would like to be left with just this instead:
11/05/2012 13:19:53 NEW MIKE : cld poe male sd cu not in till 3pm 10/18/2012 08:03:55 NEW HOSSEN : called no answer 10/11/2012 12:17:14 NEW HOSSEN : called no answer 11/14/2012 13:42:07 ACT MIKE : cld poe spk to cust sd cm back at 330
Link to article I found this formula in : [URL] .....
I have come up with this to Trim all of the data from rows 2:30 removing any trailing spaces after the last word in each cell. The macro takes a couple of minutes to run have I got something wrong that is making it run slowly or does the Trim process just take longer?
Sub TRIM_RANGE() Dim myRange As Range Dim myRow As Range Sheets("CAMPAIGNS_2007").Select Set myRange = Range("2:30") If myRange Is Nothing Then Exit Sub Application. ScreenUpdating = False myRange.Replace What:=Chr(160), Replacement:=Chr(32), _ LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False For Each myRow In myRange.Columns If Application. CountA(myRow) > 0 Then myRow.TextToColumns Destination:=myRow(1), _ DataType:=xlFixedWidth, FieldInfo:=Array(0, 1) End If Next myRow Application.ScreenUpdating = True End Sub
I am trying to make a simple quiz on a spreadsheet which will provide the score immediately the player has finished. Basically a row is as follows:
C5= Question; D5 = player's input answer, E5 = check answer and give score
For example: in C5 "What colour is a banana?" The player inputs the answer to D5: yellow in E5, the answer is tested by a formula and score is given. For this I have a formula IF(D5="yellow",1,0) hence E5 returns either 1 or 0.
Now my problem: If the player inputs one or more spaces, I need to use the TRIM function as well otherwise the answer will be incorrect. How can I work the TRIM with the IF formula?
A thought has just occurred to me that I might have to firstly Copy and TRIM the answer in to E5 and then have the IF condition in F5, but that needs another column and seems a longer way around.
I'm in need of a formula that would trim a name within a cell to look like this:
name in cell = Doe, John Result looking for = DoeJoh
or
name in cell = Smith, Robert Result looking for = SmiRob
The formula would take the first 3 letters of last name and combine them with the first 3 letters of the last name. There is a space after the , and the name would always be consistent with the exampel above.
Also what about a formula that would take a name like Doe, John and transpose it to John Doe.
* 5 Extravagant Mak (nz) (100) Need the number plus a dot then space then the name, then minus everything after the name, so this would now read 5. Extravagant Mak thats 5dot space Extravagant Mak * 11 Frisbee (100) This one would become 11. Frisbee thats 11dot space Frisbee
I'm coping and pasting data (html) into a worksheet. When I try to format some of the columns as accounting$, number, ect. They won't format. It looks as if there are spaces before and after the data. So I tried the trim and clean function but it doesn't work, so I guess the blank "spaces" are not really spaces.
It gets better...
When I do the same exact copy and paste (as html) on another persons computer, they are able to format just fine, and the "spaces" are removed automatically.
Why is this working on one computer but not the other? Is it a setting that my computer has enabled or disabled? If so, what is it?
I need to Index & Match the Max Value for 3 separate columns labeled "Price". The columns are not adjacent and cannot be moved. I am able to get the Max for the 3 Price columns using:
=MAX($L$12:$L$45,$O$12:$O$45,$R$12:$R$45).
However, I need the matching value in column D labeled "Int. SF". I can only do this for one column at a time so far using this formula
I am a basic excel user and what I want is to be able to add in a time and have the colon automatically entered for me. For example, I want to add 130 and have it come out to 1:30, or 1215 and have it come out to 12:15. Seems easy to me but I cannot figure it out.
I need to find a way to enter times into excel without having to use a colon.
The data I need in the cell is the hour, the minute, and either AM or PM. No seconds, which I believe is why Chip Pearson’s time VBA procedure doesn’t work for me, and I don’t know enough about VBA to change it for my needs.
So for example, I need to enter in times like 10:09 PM or 12:40 AM or 2:33 AM.
All my times will be entered into Column D.
I have done a ton of searching and tried several different solutions, but none of them allow me to put in AM or PM. If I just put 1009 into a cell with Chip Pearson’s macro, it will display as 10:09 AM, which is great if I need it to be AM. But if I need it to be PM, and I enter in “1009 p”, it will display as “1009 p”, neglecting the colon and not displaying the time correctly.
Does anyone have a solution where I can type in a 3 or 4 digit number (233 or 1240) and either “a” or “p” after it, and have it display as 2:33 PM or 12:40 AM?
Replaced the period with a colon, 8.23 resulted in 8:23. I have since deleted the Add In. Now every time I enter a "." it is replaced by a ":". This happens even when I disable macros on the spreadsheet. I cannot see any VBA code.
I am making a template for our security kiosk log and I wanted to simplify it as much as possible. I found the "time mask entry" and imputed that into the vba code. It was working for awhile however stopped working a few days ago. I went back and copied and pasted it again and changed the range to what I needed and an error came up stating "unable to set the NumberFormat property to the range class."
Private Sub Worksheet_Change(ByVal Target As Range) Dim vVal If Target.Cells.Count > 1 Then Exit Sub If Intersect(Target, Range("A1:A100")) Is Nothing Then Exit Sub
With Target
vVal = Format(.Value, "0000") If IsNumeric(vVal) And Len(vVal) = 4 Then Application.EnableEvents = False .Value = Left(vVal, 2) & ":" & Right(vVal, 2) .NumberFormat = "[h]:mm" End If End With
Is there any way that I can format a cell to insert a colon three spaces to the left from the end of any group of numbers that I type in the a cell? Examples 9:15 10:15
I have been sent a spreadsheet that was populated from another system. I need to run some VLOOKUPS but the cell that I need to compare has a ' in front of the text/number eg 'VB123456. I have found a thread on how to remove it for a number but it does not work with letters.
I have used the format [hh]:mm in a cell for 24 hr clock calculations. Why do I have to enter the numbers with a colon when I populate the cells? Is there a way to set it up so I just type in the four numbers and the colon between the hours and minutes populates itself?
What is the best way to concatenate with a semi-colon across multiple cells in excel. The one kicker is I only want to concatenate where the cell is populated.
If I write a simple Concatenate or combined columns, if a cell is blank I get the multiple.
Is there a way to format cells so 24 hour time may be input without the colon, as an example 1425 instead or 14:25? We can do it in Access. One would think it possible in Excel, yet I have not discover how if indeed its possible.
Is there a way to enter a colon into a standard number to create a value that can be formatted into a 24 hour time value? eg a time is listed as 1345 with a general number format, and I want it returned as 13:45 witha custom format of hh:mm. Other than creating a table and using a vlookup function
i have encountered a problem which happens when you write data that contain : in an excel sheet (i use excel 2010)
for instance if i enter to one of the cell 45:58 excel sees it as 01/01/1900 21:48:00 when i try to get the information by using a function i will get the wrong data for example typing in the different cell LEFT(Cell,5) will result 1.908
(i receiving the data from an outside source in this way and i need to make analysis)
i have noticed that the first 2 digits (21 in the example) are related to the number i have choosen in a 24 hour cycle for instance
24:58 will result 01/01/1900 00:58:00 26:58 will result 01/01/1900 02:58:00 48:58 will result 02/01/1900 00:58:00
I want to create a macro that will allow me to highlight a column and have the macro Trim every cell with text in the column, preferably putting the results over the original text. The column in question has text in every cell, until the column ends.
(That is, there are no numbers and no blanks until the data ends altogether.) I do not want to remove internal spaces in the text, just the leading and trailing ones.
I am sure this is fairly simple, but I'm not sure how to get it to look at every cell and then terminate properly.