Search for empty cells and move cells next to
Hi Claus,
Your suggestion worked very well.
Thank you very much.
Kaj Pedersen
"Claus Busch" skrev i en meddelelse
...
Hi Kaj,
Am Wed, 21 Sep 2011 20:48:23 +0200 schrieb KP:
Even with two empty cells after each other, the first one should be moved
only to column D and one row up
The next and last should be moved to column E and two rows up.
change the IF-block of Rick's code:
For Each A In Blanks.Areas
If A.Count = 2 Then
A.Cells(1).Offset(-1, 2).Value = A.Cells(1).Offset(, 1).Value
A.Cells(2).Offset(-2, 3).Value = A.Cells(2).Offset(, 1).Value
Else
A.Offset(-1, 2).Value = A.Offset(, 1).Value
End If
A.Offset(, 1).Clear
Next
Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
|