Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to check date format in display cell value
Hi All
In the Cell A1 input mm/dd/yyyy, then change the format to mm/dd/yy . How to check the display format is len(A1) = 8 or 10 by VBA ? My Coding as below incorrect '~~ Check format If Len(loSheet.Cells(rwIndex, colIndex).Value) kFormatSize(colIndex) Then xerr = xerr + 1 loSheet.Cells(rwIndex, colIndex).Interior.ColorIndex = colorErr End If moonhk GMT+8 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to check date format in display cell value
It's hard to tell what you are trying to do, but when I enter
"12/31/2007" in A1, format as mm/dd/yy, then put =LEN(A1) in another cell, the answer is 5. Excel stores dates as sequential numbers starting from Jan, 1 1900, so for example 39448is 1/1/2008. HTH, JP On Nov 6, 8:46 pm, moonhk wrote: Hi All In the Cell A1 input mm/dd/yyyy, then change the format to mm/dd/yy . How to check the display format is len(A1) = 8 or 10 by VBA ? My Coding as below incorrect '~~ Check format If Len(loSheet.Cells(rwIndex, colIndex).Value) kFormatSize(colIndex) Then xerr = xerr + 1 loSheet.Cells(rwIndex, colIndex).Interior.ColorIndex = colorErr End If moonhk GMT+8 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
change the display data format cell already contain data as date | Excel Discussion (Misc queries) | |||
Conditional format with error & date check | Excel Worksheet Functions | |||
Check data item is date not text format | Excel Programming | |||
Check if Conditional Format is True or False / Check cell Color | Excel Worksheet Functions | |||
How do i have a check display with any data entry in a cell | Excel Discussion (Misc queries) |