Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mike,
Here is some code to get you started Sub Check() Dim i As Long For i = 1 To Cells(Rows.Count, "A").End(xlUp).Row If Cells(i, "A").Value < "" Then If Not IsNumeric(Cells(i, "A").Value) Then Cells(i, "A").Interior.ColorIndex = 3 End If End If Next i For i = 1 To Cells(Rows.Count, "B").End(xlUp).Row If Cells(i, "B").Value < "" Then If Not IsDate(Cells(i, "B").Value) Then Cells(i, "B").Interior.ColorIndex = 3 End If End If Next i For i = 1 To Cells(Rows.Count, "C").End(xlUp).Row If Cells(i, "C").Value < "" Then If IsNumeric(Cells(i, "B").Value) Then Cells(i, "C").Interior.ColorIndex = 3 End If End If Next i End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Mike" wrote in message ... Hi all. Searched for this with no joy. I have a worksheet with data in columns that are either dates, numbers or free text. The worksheet is processed by a second application which doesn't run any syntax checks, so i am trying to implement a syntax check myself (it is possible ot generate this data worksheet this data in the wrong columns). Thus, i am trying to create a VB macro that will check, for example, that all entries in column A are numbers, all entries in column B are dates etc etc. Not getting much joy googl'ing it either. TIA Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cannot verify XNPV with PV or HP-12C | Excel Worksheet Functions | |||
How to verify selected data from drop-down list? | Excel Worksheet Functions | |||
How can I check/verify data in my Data Source for Pivot table? | Excel Worksheet Functions | |||
verify data with macro? | New Users to Excel | |||
Several Dates -Verify | Excel Worksheet Functions |