Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Im sorry---It appears that it is this line that is the one causing the problem Range("4:4").SpecialCells(xlCellTypeConstants) and the values are entered via data validation not a formula if that makes a difference Thanks "Bernie Deitrick" wrote: Jodi, The macro line-wrapped badly, so try this version, below. HTH, Bernie MS Excel MVP Sub Consolidate() Dim myCell As Range With Application .DisplayAlerts = False .EnableEvents = False .ScreenUpdating = False End With With Application.FileSearch .NewSearch 'Copy or move this workbook to the folder with 'the files that you want to summarize .LookIn = ThisWorkbook.Path .FileType = msoFileTypeExcelWorkbooks If .Execute() 0 Then Set Basebook = ThisWorkbook For i = 1 To .FoundFiles.Count If .FoundFiles(i) < ThisWorkbook.FullName Then Set myBook = Workbooks.Open(.FoundFiles(i)) myBook.Worksheets("Daily!").Select For Each myCell In _ Range("10:10").SpecialCells(xlCellTypeConstants) If myCell.Value < "DOG" Then ThisWorkbook.Worksheets(1). _ Range("A65536").End(xlUp)(2).Value = _ myCell.Offset(-3, 0).Value End If Next myCell myBook.Close End If Next i End If End With With Application .DisplayAlerts = True .EnableEvents = True .ScreenUpdating = True End With Basebook.SaveAs Application.GetSaveAsFilename End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |