Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Formula to get data when condition is satisfied
Hi,
Can I have formula to copy the rows that contains todays date from book1.xls to book2.xls? Thanks |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Formula to get data when condition is satisfied
Hi,
A bit more detail would have helped but try this. Right click the sheet tab where the data are, view code and paste this in and run it. Sub copyit() Dim MyRange, MyRange1 As Range lastrow = Cells(Rows.Count, "A").End(xlUp).Row Set MyRange = Range("A1:A" & lastrow) For Each c In MyRange If c.Value = Date Then If MyRange1 Is Nothing Then Set MyRange1 = c.EntireRow Else Set MyRange1 = Union(MyRange1, c.EntireRow) End If End If Next If Not MyRange1 Is Nothing Then MyRange1.Copy Workbooks("Book2.xls").Sheets(1).Range("A1").Paste Special End If End Sub Mike "Kashyap" wrote: Hi, Can I have formula to copy the rows that contains todays date from book1.xls to book2.xls? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
countif and sum if if two condition are satisfied | Excel Worksheet Functions | |||
Condition font color in a single cell based on its formula data. | Excel Worksheet Functions | |||
Looping till condition is satisfied? | Excel Worksheet Functions | |||
How to change the value of a cell when a condition is satisfied, but not otherwise? | Excel Discussion (Misc queries) | |||
Deletion of rows where a value is satisfied | Excel Worksheet Functions |