Dizzy Posted February 24, 2012 Posted February 24, 2012 Hi together, ich have some problems with time settings in excel 2007. I've created an excel template with time fields like 07:12:00 I would like to compare the times with times out of a txt-file where the time is exactly 07:12:00. But the displayed time is not the real setting in the excel-field. If i set the field to "standard" format i'll see "0,300115740740741" My question is: How can i set the times in excel to have a change to compare? Thanks for response Dizzy
water Posted February 24, 2012 Posted February 24, 2012 07:12:00 is the FORMAT of the cell whereas 0,300115740740741 is the VALUE of the. Do you want to use AutoIt to do the comparison or by an Excel formula? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Dizzy Posted February 24, 2012 Author Posted February 24, 2012 Hi water, your're right. I have an excel file with many time formats in one column like 07:00:00 07:00:05 07:00:10 07:00:15 and so on ... On the other hand i have a text file with timestamps and other values like this: 07:00:00;34;213 07:00:05;12;252 07:00:10;17;301 07:00:15;19;119 Now i want to read the txt-file line by line to fill the corresponding rows in excel. Do you have an idea? Thanks Dizzy
water Posted February 24, 2012 Posted February 24, 2012 The number you see (0,3...) is the fractional portion of a 24 hour day. 0,5 is 12:00:00. You can calulate this number by calulating the number of seconds of the time value read from the file and divide it by 86400. Then search for this number in your Excel sheet. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now