View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default Find Blank Cells and List Each Cell Address in Another Sheet

This is unreal! Exactly what I was thinking of!!! Tom, please tell me, did
you have this code saved away somewhere, or did you just create it after you
read my post?

Thanks so much.

Ryan---


"Tom Ogilvy" wrote:

Dim r as Range, cell as Range
Dim rw as Long
On Error resume Next
set r = cells.Specialcells(xlBlanks)
On error goto 0
if not r is nothing then
for each cell in r
rw = rw + 1
worksheets("Sheet2").Cells(rw,1).Value = cell.Address
Next
End if

this assumes you don't have more than 8192 discontiguous areas of blank
cells.

--
Regards,
Tom Ogilvy

"ryguy7272" wrote:

Hello Experts! I used the macro recorder to find and color all blank cells
in a used range in my worksheet. It is easy to do by firing up the recorder,
hitting Ctrl + g, ckicking Special, selecting Blanks, and filling in the
blanks with a color. I am wondering if there is a way to do something
similar, but identify the blanks cells by each respective cell address, and
put all of these in some kind of summary sheet. For instance, clicking the
commandbutton would result in a Summary sheet being created and all blank
cells would be listed by cells address, such as $D$5, $F$14, $J$92...if these
cells are blank.

Any ideas?

Kind Regards,
Ryan---