but iget the the error
application defined or object defined error
this is saying it cant place the asktime to cell
I have to bring the time thru as string as it come thru as one
I am converting minutes to [h]:mm (thank you DaveR (UK) for this part)
The formula bar shows: 1/1/1900 11:51:00
The cell contains: 35:51
Is there a way to convert the 35:51 to a string and not time? (changing the cell format to general after the 35:51 is placed gives "1.49375" which is the time in its raw format)
Sub test_time_2_String()
Dim a As Variant Dim b As Integer Dim c As Variant Dim d As String, e As String, F As String
Cells(10, 21).Activate ' Arbitrary cell
' Break it down to its smallest parts in order to watch the progression
I Dimmed d, e, & F as strings yet it still formats the cell as time as soon as it's pasted.
The ActiveCell.NumberFormat = "[h]:mm" line is there so a least I have 35:51 instead of 35:51:00. Neither General or Text formats worked.
What I am looking for is whether or not there havebeen at least three, uninterrupted true cells in that particular column. The time is based off of the last time in that string that the cell returns a true statement. For example: O-Data returns 12:46:00 PM because there aren't any true statements in any of the other three columns between 12:43:00 PM and 12:46:00 PM and there are three true statements in that column.
M-Data does not return a time at 12:42:00 PM, because at 12:39:00 PM there is a true statement returned in the L-Data column (This is what I mean by interrupting a string).
I have a mapping program that uploads data with the date and time but when it exports it the time is converted to just a number string, e.g. 15:12:37 becomes 151237000. Is there way to eliminate the last three zeros and insert a ":" between the second and third, and fourth and fifth characters?
I have an ACD program that gives me a time in "mm:ss" format, or in ":ss" fomat. I have 2-3 problems with charting this data.
1 I am inheriting the production of charts from someone else, with old data being displayed by seconds only I am supposed to keep this display.
2 the data that is in mm:ss format is recognized as being in full date format, for example 2:14 is recognized as 2:14:00 AM instead of 2 minutes, 14 seconds.
3 the data that is in :ss, ie :44, is recognized as a string.
Any thoughts on how I can convert both cases to a integer seconds? I know for example that I could mid() the second condition, but I am stuck thinking about the first condition.
I can't adjust the way the time comes in, unfortunately. It is an auto-generated export of the data from a switch.
I have a very large spreadsheet and want to count the number of times a particular text string shows up in a column. I can't use autofilter due to the 1000 limit.
Here's an example, Column C contains: Dan Parker John Doe Dan Smith Jill Smith
So if I search on *Dan*, the function should return a count of 2.
I've used COUNTIF before to return values when the whole cell = a certain value but in my case the cell may have 200 characters and I want to count based on a fuzzy search. I would like to do this in a function and not a macro.
I need a code that search through a column, counts the numer of times a string occurs and creates on another sheet the unique string and the number of times it occured.
e.g
I have this columns in a worksheet
s/n name company trainer 1 ball Dell Mk 2 doll Msed Kl 3 kol Dlink Mk 4 ball Msed Cl 5 Koll Dell Gl
I need the result to appear on another worksheet like this
This workbook is designed to prompt the user with inputboxes allowing them to enter a name, hyperlink a file to that name, and then a date. Next all the drawing names are read into an array and stored. Along with some minor sheet formatting, this is what happens when the button "Add Drawing" is clicked.
Next, when the button "Revise Drawing" is clicked, the user will be prompted with an inputbox for a drawing name. This name will be compared to the names in the array. If the name is found, the row containing that drawing will selected and the user will be prompted to update the hyperlink, then the "drawing date" will be moved to the right by one column, then the user will be prompted for another date replacing the date that was moved. The first sequence of commands or button works fine. The button "Revise Drawing" prompts the user with the inputbox requesting the revised drawing name, then develops the runtime error 1004.
when i input the arrival time of A Car, the time he arrives late appears in column D it should read 15 Minutes. how i can get this time to appear automatic after i have registered the arrival time. A Car due at 19:00 arrived at 19:15. 15minutes late. I would be grateful if you could lead me in the right direction.............
I am attempting to pick up a date with time entry on a worksheet and place it into a TextBox on a UserForm. Format on the sheet is mm/dd/yyyy h:mm AM/PM. The UserForm is placing the value as mm/dd/yyyy 12:00 AM. here is the
Private Sub UserForm_Initialize() If Not Range("dDate").Value = "" Then TextBox2.Value = Range("dDate").Value TextBox2.Text = Format(DateValue(TextBox2.Text), "mm/dd/yy h:mm AM/PM") Else TextBox2.Value = "" TextBox2.SetFocus End If End Sub
"dDate" is the named range where the date is sitting. The format is also set on the TextBox2 exit event. Can anyone see why only the date portion is being transfered with the default 12:00 AM for no time component of the value?
I have a formula in a string, like "5,6889*0,11^3 ..." and I would like to insert it as a formula into a cell or just to get the result into a variable. I have tried
ActiveCell.FormulaR1C1 = "=" & String Or ActiveCell.FormulaR1C1 = String (With the equal sign already In the String)
but it doesnt work.
When i do it manualy - select the cell in excel, put the egual sign in and paste the formula it works.
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?
I am trying to develope a "goto" page macro where the page value maybe 1,34,7A, 256C etc. I am not clear on how an inputbox value can be compared to a string variable or a numeric variable at the same time. This is what I have done, but when the texboxvalue is "7A" it doesn't work.
Does Excel have any 'built-in' ability to interpret a string as a formula, or would I need to implement a VBA function? In it's simplest form I am thinking of something along the lines:
Cell A1 contains: 5 Cell A2 contains: "*100"
Cell A4 contains: =Evaluate(A1 & A2) and hence displays 500
I know evaluate doesn't work, but is there something that does this?
The table below is a portion of a calendar to track vacation and sick time. What I am trying to do is add all the hours of vacation ("V") and sick ("E") time that an employee has used in a cell at the end of each row which represents a month. So there are 31 cells that I need to look in and if it contains V... sum in the vacation cell. There may be a space after the letters and there may not be. They can also start with a decimal.
month 1 2 3 4 5 Vacation Sick
January E8 V8 V.5 V6.25 E .5 Sum of V (should be 14.25) Sum of E
if it is possible, to use a string variable in a Formula via VBA.
For example: ActiveCell.Formula = "=SUM(Sheet3!strVariable)"
Of course the code is not working that way. The Variable has the following structer: CellAdress;CellAdress;CellAdress... so it would perfectly fit into the formula-syntax.
Is there any possible way to do that? The reason behind it is, that I have to deal with a flexible range and I want to process this range with a formula. Actually the range is flexible, because of different filters and I only wanna count all numbers in the unhidden rows.
My varibale would then contain all celladresses, for the visible cells.
So in a nutshell: is it possible to somehow use a varible in a formula?
I'm having problems with small macro I'm writing.. I'm very close to finishing it but I'm stuck at the end by an extremely small/basic error. What I wan't to do is take a Formula that was generated in a loop and is stored in a string and to output it to a cell on my worksheet as a working formula...
I am trying to create a graph of my data at the end of each month. The graph will show a count of the number of instances of each category in the data.
For example:
A1 =TODAY()B1 =MONTH(A1)
Column A from A3 down = 1,2,3,4,W,H,L Column I between I2 and I140 = multiple instances of 1,2,3,4,W,H,L
July =IF($B$1=7,(COUNTIF($I$2:$I$140,$A3)),"0") =IF($B$1=7,(COUNTIF($I$2:$I$140,$A4)),"0") =IF($B$1=7,(COUNTIF($I$2:$I$140,$A5)),"0") =IF($B$1=7,(COUNTIF($I$2:$I$140,$A6)),"0") =IF($B$1=7,(COUNTIF($I$2:$I$140,$A7)),"0") =IF($B$1=7,(COUNTIF($I$2:$I$140,$A8)),"0") =IF($B$1=7,(COUNTIF($I$2:$I$140,$A9)),"0") =IF($B$1=7,(COUNTIF($I$2:$I$140,$A10)),"0")
My problem is that when it comes around to August or the next month, I want the final count of July to be fixed/frozen so it won't change from the 1st of the month. I can then use the July column's data for my graph.
Can a formula convert itself into a value or freeze itself after certain criteria has been fulfilled?
I'm using Excel 2007. I want to write a formula that will list all characters in a string to the left of a "-". See below example. What formula would I use?.......