Hi chris,
I think the "record" you mentioned is one range of the worksheet. From you description, I'd suggest you can first copy the range into another new-
created worksheet and then perform some operaton on these cells, for example filtering the cells to pick up the blank cells etc. For your
convenience, I wrote one sample for you with commentary.
'Code begin ----------------------------------------------------
Sub Copy2NewWorksheet()
Dim oOrgRng, oRng As Range
Dim oNewRange, oNewBlankRange As Range
Dim oSht As Worksheet
Set oOrgRng = Sheets("Sheet1").Range("A1:E10")
Set oRng = oOrgRng.SpecialCells(xlCellTypeBlanks)
'if there is no blank cells found, exit this sub directly
If oRng.Count > 0 Then
'Create one new sheet
Set oSht = Sheets.Add
'perhaps you need to check whether there is
'one existing sheet who has the name Blank;
'if so, you may need to assign one new name to
'the new created sheet
oSht.Name = "blanks"
'select the source range
Sheets("Sheet1").Select
oOrgRng.Select
'perform the copy
Application.CutCopyMode = False
Selection.Copy
'select the new created blanks sheet
Sheets("blanks").Select
'select one cell to star the paste
Call Range("A1").PasteSpecial(xlPasteAll)
Set oNewRange = Selection
Set oNewBlankRange = oNewRange.SpecialCells(xlCellTypeBlanks)
' I set the border color of these blankcells to blue
oNewBlankRange.Borders.Color = RGB(0, 0, 255)
'Since the contents from the source range has also
'been copied to the new created sheet, you can
'use the code below to clear the range
oNewRange.ClearContents
End If
End Sub
'Code end ------------------------------------------------------
Please feel free to let me know if you have any further questions.
Best regards,
Wei-Dong Xu
Microsoft Product Support Services
Get Secure! -
www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.