:24 PM
To: excel-macros@googlegroups.com
Subject: RE: $$Excel-Macros$$ For Each loop
Hi Richard,
Here's my approach:
Sub prototype()
Const ColumnlarCriteria As String = "X3:X1000<>5"
Dim LockRange As Range
Dim LockRow() As Variant
Dim Row As Long
With She
7;t already know what
they are.
Asa
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Richard
Sent: Tuesday, June 26, 2012 8:37 AM
To: excel-macros@googlegroups.com
Subject: Re: $$Excel-Macros$$ For Each loop
Thanks for your reply, but I guess I wasn't
om]
Sent: 26 June 2012 10:43
To: 'excel-macros@googlegroups.com'
Subject: RE: $$Excel-Macros$$ For Each loop
Well, This was the approach . See the attached file
Sub Mtest()
Dim rngRange As Range
Dim rngBlanks As Range
Dim ValtoReplace
(I checked it... in Excel 2010, it processed 100,000 rows in about 15 seconds.)
Paul
-
“Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As l
Thanks for your reply, but I guess I wasn't clear --
condition a ===if the value of cell x3=5 then I want cells y3 through ax3
to be unprotected, otherwise I want them to be protected.
condition b ===if the value of cell x3<>5 then the reverse happens
and I would to do it for each row with data
No need to Loop
UsedRange.Replace "X",""
Set rng=UsedRange.SpecialCells(xlcelltypeblanks)
Rng.value="X"
Rng.entireColumn.Locked=True/False (whatever your want)
Regards
Rajan verma
+91 7838100659 [IM-Gtalk]
From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com