IgnBan
03-05-2008, 08:01 PM
Good night everybody.
I got a question about data validation. How can I validate the data entry of a Sheet where the user by the action of pressing a macro button input current day summary data. What the macro does is copy at the end of working day totals of data collected and paste it to a table and a chart plots the data automatically.
My question is; how can I validate that the data is not entered twice and at the same time validate that is enter?
The data copied has a cell with the current day date that I think will be key for the validation. Here is the macro I wrote to paste the data;
Sub PasteDailyData()
Application.ScreenUpdating = False
Sheets("TAG-CHART").Select
Range("K87:U87").Select
Selection.Copy
Sheets("TAG_HISTORY").Select
Range("A1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("SWITCHBOARD").Select
End Sub
types copied are;
Date, Percentage, Percentage, Percentage, Percentage and Number.
Sample workbook is attached.
Any ideas are in advance greatly appreciated :thumb
I got a question about data validation. How can I validate the data entry of a Sheet where the user by the action of pressing a macro button input current day summary data. What the macro does is copy at the end of working day totals of data collected and paste it to a table and a chart plots the data automatically.
My question is; how can I validate that the data is not entered twice and at the same time validate that is enter?
The data copied has a cell with the current day date that I think will be key for the validation. Here is the macro I wrote to paste the data;
Sub PasteDailyData()
Application.ScreenUpdating = False
Sheets("TAG-CHART").Select
Range("K87:U87").Select
Selection.Copy
Sheets("TAG_HISTORY").Select
Range("A1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Sheets("SWITCHBOARD").Select
End Sub
types copied are;
Date, Percentage, Percentage, Percentage, Percentage and Number.
Sample workbook is attached.
Any ideas are in advance greatly appreciated :thumb