some data in da same cell
some data in da same cell
Test this on a copy of your workbook
Select a single rectangular area of cells containing data, then run this macro
Sub DeleteandLeave()
'
' Randomly deletes some data in different cells at the
' time of running while leaving other data in da same cell
' Note: unconstrained by the value in the cell
'
Set rng = Selection
For k = 1 To Int(Rnd() * rng.Rows.Count * rng.Columns.Count + 1)
i = Int(Rnd() * rng.Rows.Count + 1)
j = Int(Rnd() * rng.Columns.Count + 1)
rng.Cells(i, j).ClearContents
Next k
End Sub
This may not be exactly what you want, but hopefully it "shows the way".
--
Regards,
Tom Ogilvy
"maddy" wrote:
> some data in da same cell
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks