0% found this document useful (0 votes)
9 views

Excel Formatting 3D 3rd

The document discusses different custom number and date formats in Excel. It provides formulas to convert 8-digit numbers representing dates and times into actual date and time values that can be used for calculations.

Uploaded by

Dave Thacker
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Excel Formatting 3D 3rd

The document discusses different custom number and date formats in Excel. It provides formulas to convert 8-digit numbers representing dates and times into actual date and time values that can be used for calculations.

Uploaded by

Dave Thacker
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 15

% (0.

00%)

Comma Style (xx)

Comma Style (.0000)

$0.00

$0.0000

No slashes req'd MM/DD/YYYY

Text

% (0.00%)

Comma Style (xx) Comma Style (.0000)

$0.00

Now insert a column just after this column to hold the actual date for use in calculations. Let's say the eight-digit dates were in

To enter HH:MM time values without the colon, you'll simply use a different custom format. The format 0\:00 will give one- o

$0.0000

no slashes req'd MM/DD/YYYY

Text

culations. Let's say the eight-digit dates were in column A, starting in cell A2. Then you would enter this formula in cell B2 and copy it dow

ustom format. The format 0\:00 will give one- or two-digit hours, while the format 00:\00 will always give you two-digit hours, left-padding

a in cell B2 and copy it down the whole column: =DATE(MOD(A2, 10000), TRUNC(A2 / 1000000), MOD(TRUNC(A2 / 10000), 100)). The M

wo-digit hours, left-padding with a zero if necessary. A formula like this one would convert the typed value into an actual time value for use

OD(TRUNC(A2 / 10000), 100)). The MOD function returns the remainder when dividing its first argument by its second. Thus the first sub-e

alue into an actual time value for use in calculations: =TIME(TRUNC(A2/100),MOD(A2,100),0).

nt by its second. Thus the first sub-expression returns the last four digits of your numberthe year. For the month, we divide by 1,000,000

r the month, we divide by 1,000,000 and use the TRUNC function to throw away any fractional part. And for the day, we do a combination

nd for the day, we do a combination of the two.

You might also like