Y
ytayta555
HI ALL
I get here {in this community} a very usefull help for me with a
Macro;
I needed a macro to delete a ,,specific range,, in every Row,
if the value from BD91 to BD 65536 <=32 ;
here is the macro :
Sub Clear_Ranges()
' Macro recorded 3/5/2008 by Tim
Dim cell As Range, rng As Range
Set rng = Range(Cells(91, "BD"), Cells(Rows.Count,
"BD").End(xlUp))
For Each cell In rng
If cell.Value <= 32 Then
Cells(cell.Row, "C").Select
Selection.Resize(1, 52).Select
Selection.ClearContents
End If
Next
End Sub
It works perfect , but it take in my database [of 231 workbooks]
a looonger ... time ,even this macro find in the same range {BD91 to
BD65536} the Value >=33 , and then Copy this EntireRow in another Wo
rkbook ; I tried so :
Sub Clear_Ranges()
' Macro recorded 3/5/2008 by Tim
Dim cell As Range, rng As Range
Set rng = Range(Cells(91, "BD"), Cells(Rows.Count,
"BD").End(xlUp))
For Each cell In rng
If cell.Value >= 33 Then {here maybe must be EntireRow .Select}
Cells(cell.Row, "C").Select
Selection.Resize(1, 52).Select
Selection.Copy
Windows("R1.xls").Activate
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Windows("YTA1.xls").Activate
End If
Next
End Sub
.......but it didn't work ;{particular informations : both
workbooks named YTA1 and R1 are open ;R1 is the
basic workbook which get the results I need from
the others workbooks;in this case I want to select
and copy in wb R1 the EntireRow of the other wb
if the value in this Rows in Column BD is >=33 }
Respectfully to ALL
I get here {in this community} a very usefull help for me with a
Macro;
I needed a macro to delete a ,,specific range,, in every Row,
if the value from BD91 to BD 65536 <=32 ;
here is the macro :
Sub Clear_Ranges()
' Macro recorded 3/5/2008 by Tim
Dim cell As Range, rng As Range
Set rng = Range(Cells(91, "BD"), Cells(Rows.Count,
"BD").End(xlUp))
For Each cell In rng
If cell.Value <= 32 Then
Cells(cell.Row, "C").Select
Selection.Resize(1, 52).Select
Selection.ClearContents
End If
Next
End Sub
It works perfect , but it take in my database [of 231 workbooks]
a looonger ... time ,even this macro find in the same range {BD91 to
BD65536} the Value >=33 , and then Copy this EntireRow in another Wo
rkbook ; I tried so :
Sub Clear_Ranges()
' Macro recorded 3/5/2008 by Tim
Dim cell As Range, rng As Range
Set rng = Range(Cells(91, "BD"), Cells(Rows.Count,
"BD").End(xlUp))
For Each cell In rng
If cell.Value >= 33 Then {here maybe must be EntireRow .Select}
Cells(cell.Row, "C").Select
Selection.Resize(1, 52).Select
Selection.Copy
Windows("R1.xls").Activate
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Windows("YTA1.xls").Activate
End If
Next
End Sub
.......but it didn't work ;{particular informations : both
workbooks named YTA1 and R1 are open ;R1 is the
basic workbook which get the results I need from
the others workbooks;in this case I want to select
and copy in wb R1 the EntireRow of the other wb
if the value in this Rows in Column BD is >=33 }
Respectfully to ALL