On Nov 2, 8:11*am, jlclyde <jlcl...@taylorcorp.com> wrote:
> I have a range that I need to add the same text to if the cell is
> visible. *Is there a way to do this without putting in a loop? *Here
> is my code.
>
> Thanks,
> Jay
> * * * * Set Rng = .AutoFilter.Range.Offset(1,
> 0).Resize(.AutoFilter.Range.Rows.Count - 1) _
> * * * * * * .SpecialCells(xlCellTypeVisible)
>
> * * * * * * If .Rows(.Rows.Count).Row <> 4 Then
> * * * * * * * * Set Rng = .Range("A5:A" & Lstrow)
> * * * * * * * * Set Rng = Rng.SpecialCells(xlCellTypeVisible)
> * * * * * * * * Rng.Value = Rng.Value & "N"
> * * * * * * End If
If ?? every cell in the range ends with the same thing such as M then
columns(1).replace "M", "MN"
else loops shouldn't be too slow these days.
|