Need some help with excel
San,
Just clear my following queries...
1. I think your point is to run the macro whenever you are entering in
Column-A (Tell me Yes/No)
2. If you are entering in Column-A and the date is also 30-Aug-06, then the
sum value should come in the cell F5, using the below code,
Application.Sum([Target:A5])
But if we add like this then all the values between Target and A5 will be of
Date, then it will result to a bulk amount.
3. Tell me in all the rows you want the same formula, or till the dates
entered from 1st row to 4th row.
Please clear my queries, so that I can try for a solution.
Regards,
Sriram
"San" wrote:
Public Sub Worksheet_Change(ByVal Target As excel.Range)
Dim dato As Date, DatoAug As Date
dato = Format(Now, "mm-dd-yy")
DatoAug = Format("08-30-2006")
With Target
If .Column < 1 Then Exit Sub
If dato < DatoAug Then Exit Sub
Application.EnableEvents = False
Range("F5").value = Application.Sum([Target:A5])
Application.EnableEvents = True
End With
End Sub
This formular obviously doesn't work...but since i'am noob I don't know
why. The targeted cell(If .Column < 1 Then Exit Sub) has to be collum
A otherwise it will exit sub(this part works. So the problem is that I
cannot SUM the targeted(this value is A5 to infinitive) with cell A5.
Many thx for any help
|