Excel Macros
Let's say your formula in the worksheet is:
=COUNTIF(A$1:A$10,"12/6/2006")
First, without VBA use
=COUNTIF(A$1:A$10,D2) and put the date in D2
or with VBA:
Sub update()
Dim s1 As String, s2 As String, s3 As String
s1 = "=countif($A$1:$A$10,"
s2 = """12/6/2006"""
s3 = ")"
Range("B9").Formula = s1 & s2 & s3
End Sub
and replace s2 as needed or set s2 with an inputbox.
--
Gary's Student
"Kelvin9811" wrote:
I want to create a macro that changes the date in a specific formula. I have
a spreadsheet and I want to find out how many files where received on a
specific date. Any help will be greatly appreciated
|