DateTime Stamp With Correct Number Format?
Nov 25, 2013
I am trying to date and time stamp a certain cell. This cell is going to be compared to another cell in another sheet (also date and time) so that I can track deadlines being met.
I am using the following code to stamp the cell:
VB:
Range("F26").NumberFormat = "[$-409]m/d/yy h:mm AM/PM;@".Value = Now()
Even with the number format, the cell is not stamped as a number. As a result I get #value errors when I take the difference between the stamped cell and the cell with the preset deadlines.
View 2 Replies
ADVERTISEMENT
Jul 4, 2014
Is there a formula to remove seconds part from datetime stamp? 6/26/2014 6:14:25 AM, should be converted to 6/26/2014 6:14 AM I used ROUND((DATEVALUE(H2)+TIMEVALUE(H2))*1440,0)/1440 but it is providing #value! error
View 2 Replies
View Related
Jun 9, 2008
I have a macro which creates a new file and saves an extract of data to it. I would like to add a datetimestamp to the end of the filename while saving.
Is there anyway to do this using my existing macro with some changes?
My relevant part of the macro looks like this.
Workbooks.Add
ActiveWorkbook.SaveAs Filename:= _
"W:PJ_Report.xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
This saves the file as PJ_Report.xls
I would like this to be
PJ_Report_20080609110403.xls
or even
PJ_Report_20080609 will do.
View 9 Replies
View Related
Jun 18, 2014
Been working on this issue for the last couple of days with no luck. I have a column of data that is a data and time stamp, for any date or time like below. This is an ever growing list as users continue to populate the data.
13/04/2014 20:00
28/04/2014 17:30
09/04/2014 13:30
09/04/2014 14:00
03/05/2014 7:30
03/04/2014 11:10
On a separate sheet I have a list of times by 15 minute increments starting at midnight until 11:59PM like below.
12:00:00 AM
12:15:00 AM
12:30:00 AM
12:45:00 AM
I'm trying to count how often a time stamp occurred between two 15 minute increments. ventually I'll be plotting this data on a graph to show where most occurrences happen.
View 1 Replies
View Related
Jul 28, 2006
I have a querytable running on my sql database. In the query I have a trimleft function because the numbers are stored with several proceeding blank spaces. When I execute the query through my macro, everything works fine, except I can't average or sum the results. They can be multiplied, divided, etc, but not averaged or summed (they just show as zero on summing, which makes the average DIV/0). The really strange part is that if I select a number and go to the formula bar and hit delete at the beginning of the number (which actually deletes nothing), the number is suddenly capable of actually performing as a number. I assume this has something to do with how the querytable is returning my results, but does anyone have an idea for a workaround for this issue?
View 3 Replies
View Related
Feb 14, 2012
I have several sources of information for client files. the number format includes a reference number and a month, eg 123/11, 456/02. In some cases, the numbers may be presented including the company initials, eg ABC/00123/11. I want to make sure all numbers on all sources are the same as I am using Vlookup and this reference no to copy information from one source to another. Sometimes when I change the format Excel sees this as a date, eg 11/11 is 11-Nov, and in some cases Excel sees a fraction, eg 123/11 is 123 11ths or 123 divided by 11.
I can easily take out the reference no with a find and replace FIND ABC/ replace with . But this often results in a number with leading zeroes, eg ABC/0123/06 will leave 0123/06.
I am using Excel 2003.
View 1 Replies
View Related
Jan 26, 2014
We receive about 20 sales files of several hundred lines of data each day from various agencies. I want to create a macro / VBA code which checks that the data submitted is correct so that we can upload it into our database without import errors and / or having to manually check each line of data.
I envisage something like an output report:
#####################
149 entries
Column A - Date - OK
Column B - Customer_Phone - Errors (Should be 11 digits)
Row 21 - Customer_Phone - Error (Not 11 digits)
Row 108 - Customer_Phone - Error (Contains letters)
Column C - Outcome - OK
Please correct and re-check.
#####################
View 4 Replies
View Related
May 1, 2014
I have around 30k data. which is in invalid format.
Ex: 12987654321vinay kk 876543219
32567456789 kkccjhg fo 345678921
I want to convert this into correct format as below with start letter from
MOD, 987654321,, vinay, kk,87654219
MOD,567456789, , kkccjhg, fo,345678921
I want to know which are formulas I have to use to get this info in correct format.
View 1 Replies
View Related
Jan 23, 2009
I have a spreadsheet which needs to display currency in the correct format dependant upon whether a contract is in English or German Law. Excel defaults currency format as €310,000.00 however in German this needs to be €310.000,00 i.e. with the decimal point and comma in opposite positions. Does anyone know what expression I can use to format it as the latter?
View 2 Replies
View Related
Feb 26, 2014
I have a large number of cells with time stamps: 00:07:45 (hh:mm:ss)
What I would like to do is just show the mm - but NOT format the cell as [mm], just as a general / number '7'.......
View 3 Replies
View Related
Jul 9, 2009
I have a question regarding Do While loops. I'm trying to write a do while loop to search through an array for a particular value and return the row number. This value is in the first column of the array and there are 211 of each value chronologically sorted. So, the first column from top to bottom reads 1,1,1,1..211 times, then 2,2,22,..211 times and so on. For this case, I want to return the first row where a particular value is found.
The loop I wrote is as follows: ....
View 9 Replies
View Related
Nov 19, 2009
Userform Activate Label in correct format. I have the following code in a userform activate
View 2 Replies
View Related
Feb 12, 2009
I have been trying to find an easier way to make sure that the email address that I have been given in a excel workbook are in the proper format before I try to use them. I have tried doing a google search on this subject but have not found the correct solution. I want to enter a function in column L that would use a regular expression for the email format and compare it to the email address in column J. If the results are true place a value of 1 in column K. If false place a value of 0 in column K.
View 2 Replies
View Related
Jun 7, 2013
When I import data , the dates appear as follows in Col G sheets "Imported Data"
If I select Col G and use Text to columns and select mdy, it gives me the dates in the correct format. However, If I use the macro recorder to do this and then run the macro, it does not work
I have attached the dates after using text to Columns wjhich is the correct format.
Imported Assets *G207/01/2006302/01/2007402/01/2007511/01/2008601/01/1985720/11/1990801/01/1985901/01/19851001/01/19851101/01/19851225/09/19921302/01/1993
Imported Assets  G201/07/2006301/02/2007401/02/2007501/11/2008601/01/1985720/11/1990801/01/1985901/01/19851001/01/19851101/01/19851225/09/19921301/02/19931401/05/19931501/06/19931601/08/19931701/01/19941801/09/1995
View 2 Replies
View Related
Aug 17, 2008
We have a system that normally dumps our data in the format of column K, with all of the data in one column and the same spacing you see below in red. The problem is when the system is slow, we have to manually dump it, and when we manually dump it, it comes out spread out from column A to column I. For the macro to work without bugging out on me, it has to be in the same format as column K, with exactly the same spacing.
I have tried text to columns while importing, amongst other things, but have not had any luck. So in a nutshell I need to be able to make column A thru I, look just like column K with exactly the same spacing. The data dumps are different every day.
I have a strange feeling I will not get a reply on this question, because it is so strange, or that I failed to articulate it correctly....
View 9 Replies
View Related
Sep 11, 2013
I have a spreadsheet with five cells (L3 - L7) that have dates entered into them in the format of 9/9/2013, 9/10/2013, 10/20/2013, 10/21/2013, 10/22/2013. In another cell, cell n2, I have the formula:
=IF(L2=0,"",IF(L2=1,L3,IF(L2=2,CONCATENATE(L3,L4),IF(L2=3,CONCATENATE(L3,L4,L5),IF(L2=4,CONCATENATE(L3,L4,L5,L6),IF(L2=5,CONCATENAT E(L3,L4,L5,L6,L7)))))))
In cell n2 I get: 41526415274156741568481569 This is the excel number for the above dates, but I need it to look like:
Sep. 9 - 10, 2013, Oct. 20 - 22, 2013
I also need it to be able to isolate single dates for example if the date in cell l5 was 10/5/2013 instead of 10/20/2013 then I would want n2 to look like Sep. 9 - 10, 2013, Oct. 5, 2013, Oct. 21 - 22, 2013. but my formula currently only changes that number in the string from 41567 to 41552.
The reason I need this is because this information is part of a identifier and also maybe used in reports, the people reading the reports won't know this long number is actually dates and won't be able to read them if they did.
Also the cells L3 - L7 data depends on cell l2, 1 = one date entered into cell l3, 2 = two dates, one in cell l3, the next in cell l4, and so on for up to five total days that may or may not be consecutive. Also, it seems to work as is, but only for one day.
View 1 Replies
View Related
Dec 11, 2008
I have the following code to ensure user inputs date in correct format, but on test it doesn't capture if they enter 11.12.08 (Which we have had people do before), if that is entered the textbox returns 30/12/99, is there a way I can prevent this?
Private Sub txtStartDate_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'Checks Start Date is in correct date format
If IsDate(txtStartDate.Value) Then
txtStartDate.Value = Format(DateValue(txtStartDate.Value), "dd/mm/yy")
Else
MsgBox "Please enter a valid date format."
Cancel = True
End If
End Sub
View 9 Replies
View Related
Feb 18, 2013
I have a form on which I select a date (using a calendar form) and on the form it works perfectly. The date is in the correct dd/mm/yyyy format for example (03/04/2013 - 3rd April 2013), I then insert this date into a worksheet and it comes out in the correct format, but it is actually turning the dates around so where it should be putting 3rd of April (03/04/2013), it's inserting 4th March (04/03/2013) instead. It looks very much like the form sees the date in dd/mm/yyyy format and the worksheet when taking the data from the form thinks it in US format (mm/dd/yyyy).
[Code] .....
View 5 Replies
View Related
Jun 28, 2007
How can I add a date stamp that will populate a field when text is entered into another cell but will not change every time I re-open the sheet. I have been using =if(B4="",NOW()) which changes each time though and as soon as text is entered it disappears. I want to capture the actual date that someone enters text into a cell and save that date in another cell???
View 5 Replies
View Related
Oct 19, 2009
I need the names of students from Summative tab in the correct box based on how many question they got correct. (Q 27-32, (0-1, below, 2-3, Average, 4-5, Above Average, 6, Excellent Performance. )
I have attached a file.
View 8 Replies
View Related
Apr 23, 2014
I am trying to do with this spreadsheet project,
On the "Master" tab, I would paste in the newest information received from our system weeklywhich is around 2600 rows. I want to then compare the Master sheet to the other tabs and if there is a new Serial Number present in column I, then add that row of data to the next available row at the bottom to the correct tab.
The Orange tabs Fleet Volume PC, Fleet Volume BW, Fleet Volume Duplex will house all countries and all serial numbers but Fleet Volume Color tab will only have Color Serial Numbers for all countries, column J on the Master tab.
So, the same will goes for the USA Volume and CAN Volumes tab, only those serial numbers for that country will falls in these tabs and color only will go in the color tabs. There are 14 other tabs missing from this workbook with other countries, just removed to keep size of file within limits.
From my workbook, rows 29 to 33 on the Master tab are new serial numbers.
Also, I want to highlight the data on the Master, after comparing this Master tab to the other tabs and within the Master highlight in yellow the cells that have new updated information!
View 14 Replies
View Related
Jul 19, 2014
I have two processes that has to run depending of the week number of the year. So even weeks has to run "sub 2" and odd weeks has to run "sub 1".
Weeks with number 1,3,5,7,9,11,13,15 etc has to call "sub 1" and weeks 2,4,6,8,10,12,14,16 etc has to call "sub 2".
The filenames consist of "name_name_YYYYMMDD.xls" (example: SteveSmith_Runningshoes_20140719.xls)
So vba needs to calculate the week number by reading the YYYYMMDD of the filename and then call the correct sub.
View 6 Replies
View Related
Feb 8, 2013
=HLOOKUP(G8,'Headline Assumptions'!$C$32:$F$37,E8,FALSE)
Above formula, in cell E8 is the number 3, however excel does not recognise this and returns 1. is there a way i can get E8 to see that it is a 3 in that cell and return the correct number of rows downwards in my table?
View 1 Replies
View Related
Apr 3, 2009
We have server in Troy(USA).So we are in the situation to convert EST DateTime to IST DateTime in EXCEL.
If you have any formula or Idea share with me.
Eg; EST : 04/03/09 09:31:53 (I/P)
IST : 04/03/09 07:01:53 (O/P)
View 9 Replies
View Related
Feb 15, 2010
I'm trying to create a formula that will added the correct amount in the correct cells, I have create a dunny sheet in trying to achieve this. If Cell B8:B11 = ABS or Dum that any points won should be added to Cell L8:L11 right now its adding it into K8:K11. If Cell B8:B11 = is Blank any player points should be added to cells K8:K11. I'm using this formula throughout cells K8:K28 =IF(J8>J25,1,IF(AND(J8<>0,J8=J25),0.5,0)) Any thing in red is incorrect anything in blue is what I'm trying to achieve.
View 4 Replies
View Related
Aug 6, 2007
I have a spreadsheet that has been sent to multiple clients. I have discovered an error in a few of the cells:
1. a link between two cells is broken so the correct number is not showing up in the cell. It is a simple formula ie: =A15, that I either forgot to put in or deleted in a fit of madness. It is in the same cell on the same worksheet in the workbook.
2. A hidden column on a worksheet has a formula that sums a range of cells. I have discovered that this range of cells is wrong. This error is duplicated on a number of worksheets in the workbook. The problem is that the error is in the same column in each worksheet but not in the same row.
Each worksheet is password protected. This is done through VBA code so the passwords won't be a problem.
The clients have already started working on the spreadsheet that I sent them and I want to send them a "fix" so that the correct formula will just update the spreadsheet they already have rather than me sending a completly new one and them having to start from scratch.
I had this wonderful spreadsheet set up with columns that appear and disappear and formulas galore so that the client didn't have to do to much work and then I find these errors after it has been sent. My testers let me down but that's life.
View 9 Replies
View Related
Sep 22, 2009
i have a column
"Received On" contains the datetime of a mail received , it is in BST, sometimes it should be in GMT depends on the date or year, i'm not sure.
So what my query is, in another column, i have to check if the datetime in "Received On' is in BST, convert this datetime to GMT, otherwise if this time is in GMT, i don't need to add anything just copy that datetime alone.
eg: ie in ColumnA is the Datetime value
if ColumnA=BST then
ColumnB=ColumnA+1/24 (ie convert BST to GMT)
else if ColumnA=GMT then
ColumnB=ColumnA (ie not need to change, becz already columnA is in GMT)
View 9 Replies
View Related
Jul 3, 2008
I have a table with 3 columns of dates and then a column with Set # that I
feel in the box #.
I need to see how many items processed for each set per day.
Example:
[url]
The problem is that it counts the correct amount but not with the correct
dates.
The formula that I use is:
=SUMPRODUCT(--($I$3:$I$8<>"")*(($C$3:$C$8=39601)+AND($E$3:$E$8=39601)+AND($G$3:$G$8=39601)))
View 14 Replies
View Related
Mar 31, 2014
I'm trying to do a select function in Google Spreadsheet.
=QUERY('Page1'!A:C;"select A,B,C where A >= datetime "&(F2) ; 1)
F2 contains a DateTime value : 28/03/2014 00:00:00.
I'm receiving this error:
Error: Unable to parse the query string parameter to QUERY Function 2: PARSE_ERROREncountered "A> = datetime 41726" at line 1, column 20.
Why spreadsheet returns an Integer value? How do I convert this int value to a DateTime?
View 2 Replies
View Related
Jul 30, 2012
in C a string is nothing more than an Array of characters ending with a null character.
in VBA this does not seem to be the case.I am trying to use the BlowFish code from David Midkiff for some encryption, however the code sometimes fails:
When encrypting a string a string of a specific length should be returned. however sometimes one of the characters of the encrypted string is a null character, and the returned encrypted string (with a embedded null character) is causing me problems. I want to check for the null character and if present redo the encryption. But how do I check for the presence of this null character in a unicode (double-byte) string?
Checking with Len(encrypted) gives the correct length (!) but trying to move each (unicode)character into an array fails when using the Mid() function past the null character in the string.
Now I can use
byteArray() = StrConv(unicodetext,vbFromUnicode)
to get the lower byte of each character into an array easily, but how do I do this for both bytes of the unicode characters?
Using an integer array does not work other than through
intArray(j) = CInt(AscW(Mid(Outp, j, 1)))
which fails on the nullstring in my encrypted text.
I have tried with variants but so far no luck. I thought if the string was entered into a variant then I could also address the variant as an array of bytes, but that does not seem to be accepted by VBA.
View 1 Replies
View Related