Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Macro to insert formula using Autofilter


I'm trying to create a macro that will select a range of rows fitting
a certain criterion, then insert today's date into an empty cell in
each row that matches the criterion. I set up the macro to insert the
formula into the top cell of the range and then copy the formula down
the range. My problem is that I have to run this macro daily, and the
range of rows changes every day. I set up the macro using today's
report, so it contains today's ranges, but I need to alter the macro
so that it selects the active range for each day. Here is the relevant
portion of the macro:

Selection.AutoFilter Field:=8, Criteria1:="Ad"
Range("L87").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Selection.Copy
Range("L307:L5100").Select
ActiveSheet.Paste

I'm a complete novice at macros, so if anyone has any ideas for a code
that would work, please help!

Thanks,
Jill

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 do you insert a macro into a formula? Obe Excel Discussion (Misc queries) 7 November 13th 06 01:15 PM
Insert a Formula with a Macro Ed Excel Discussion (Misc queries) 2 October 22nd 06 11:37 PM
macro to insert into a formula Todd Excel Worksheet Functions 1 March 8th 06 04:55 PM
HOW DO YOU INSERT A MACRO INTO A FORMULA blopreste3180 Excel Worksheet Functions 6 December 21st 05 08:41 PM
Insert macro into formula Paul Excel Worksheet Functions 1 May 12th 05 08:25 PM


All times are GMT +1. The time now is 03:09 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"