#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Data check

Hi, I would check data table. There are 150 columns about 3600 rows. I
need to check if data field is missing value. If yes, so error message
must be generated. Doesn't anybody know to help me with macro? Thanks
Pavel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Data check

Sub CheckData
Dim X as double
Dim Y as double
Dim ErrorData(50000,2) as variant
Dim Fnd as double
for X=1 to 3600
for Y=1 to 150
if cells(x,y).value=empty then
Fnd=Fnd+1
ErrorData(Fnd,1)=X
ErrorData(Fnd,2)=Y
end if
Next
Next
if Fnd0 then
Dim MyEntries As String
Workbooks.Add Template:="Workbook"
MyEntries = ActiveWorkbook.Name
Cells(1,1).value="Bad Row"
Cells(1,2).value="Bad Col"
for X=1 to Fnd
cells(x+1,1)=ErrorData(X,1)
cells(x+1,2)=ErrorData(x,2)
Next
End if
'then add code for printing or whatever....
End sub


" wrote:

Hi, I would check data table. There are 150 columns about 3600 rows. I
need to check if data field is missing value. If yes, so error message
must be generated. Doesn't anybody know to help me with macro? Thanks
Pavel

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Data check

hi Pavel,
missing value means a blank cell? then try this macro:

Sub GetBlankCells()
On Error Resume Next
Set rng = Range(ActiveSheet.UsedRange.Address). _
SpecialCells(xlCellTypeBlanks)
If Err.Number 0 Then
MsgBox "no blanks"
Else
MsgBox "blanks in " & rng.Address
End If
End Sub

bye
stefan


On 20 Mai, 14:08, wrote:
Hi, I would check data table. There are 150 columns about 3600 rows. I
need to check if data field is missing value. If yes, so error message
must be generated. Doesn't anybody know to help me with macro? Thanks
Pavel


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I check/verify data in my Data Source for Pivot table? gayleh Excel Worksheet Functions 1 April 16th 08 08:30 PM
Data check Brian Matlack[_107_] Excel Programming 2 July 13th 06 10:30 PM
How can I check if data in an external data range is changed afte. Ruud Excel Worksheet Functions 0 January 7th 05 12:15 PM
How can I check if data in external data range is changed after re Ruud Excel Discussion (Misc queries) 0 January 7th 05 12:07 PM
data check Herb[_6_] Excel Programming 3 November 22nd 03 04:53 PM


All times are GMT +1. The time now is 12:18 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"