Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-21-2013, 01:08 PM
BobBridges's Avatar
BobBridges BobBridges is offline Text auto formatted as date format Windows 7 64bit Text auto formatted as date format Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Ah, I see. 4.16875 is actually the correct value, Aikeedoh; it's just not formatted the way you want.



Let's say that the worksheet where you're doing the VLOOKUP is named Master, and the worksheet it's looking at is Target. In Target it looks right ("100:03:00"), but in Master it's wrong ("4.16875")—or rather the value is right, but the format is wrong. In Master, change the formatting to "[h]:mm:ss", and 4.16875 will be displayed as "100:03:00".

Here's why: Excel stores dates and times as whole numbers. 4 is four days; 4.5 is four and a half days, ie 4 days and 12 hours. Just now the date and time where I am is 41507.66646, that is, 41507 days since 1900-01-01, plus .66646 of another day. That comes out to 2013-08-21 15:59:42.550, you see.

Now, what Excel is finding is 4.16875. If you tell Excel to format the result (in Master) as "yyyy-mm-dd", it'll ignore the time part and just display "1900-01-04" (four days since the start of 1900). If you format it as "hh:mm:ss", it'll ignore the whole days and show just the fraction of the day as "04:03:00". But put square brackets around the hours, "[h]:mm:ss", and it'll show it the way you want.
Reply With Quote
  #2  
Old 09-06-2013, 02:38 AM
C J Squibb C J Squibb is offline Text auto formatted as date format Windows 7 64bit Text auto formatted as date format Office 2010 32bit
Novice
 
Join Date: Aug 2013
Location: Essex
Posts: 14
C J Squibb is on a distinguished road
Default

Your problem is that Excel converts anything that vaguely looks like a date INTO a date. Simply change the number format of this column to Text and you should be OK. Your value is not really a number, it is text composed of alphanumeric characters which happen to be mostly digits - but this is not the sort of number used in calculations.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text auto formatted as date format AutoCorrect with Formatted Text pmokover Word 16 10-30-2024 02:50 AM
Auto Date klaws Outlook 0 08-24-2012 01:01 PM
date format gsrikanth Excel 1 12-28-2011 05:06 AM
Import formatted text from Word into PowerPoint parboy PowerPoint 0 07-06-2011 08:52 AM
Auto Update the date. Nirik Excel 16 12-16-2010 04:23 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:07 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft