LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default 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

 
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
How to remove excel macros still there after normal delete? James Excel Discussion (Misc queries) 1 April 20th 06 09:45 PM
I deleted all macros in Excel but still get dialog box VenitaC Excel Discussion (Misc queries) 2 September 19th 05 07:05 PM
Are macros created in Excel 2003 compatible with Excel 5.0/95? Hakmui Excel Discussion (Misc queries) 1 August 31st 05 01:33 AM
How do I update Excel 2000 macros to work in Excel 2002? BobPetrich Excel Discussion (Misc queries) 3 January 4th 05 04:06 PM


All times are GMT +1. The time now is 04:19 PM.

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

About Us

"It's about Microsoft Excel"