View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Helmut Helmut is offline
external usenet poster
 
Posts: 111
Default Print rows of missing info

Hi DomThePom,
Great BUT it prints not only the rows with the BLANK CELL but it prints the
whole worksheet. I only want to print the rows with the blank cells.
thanks
Helmut

"DomThePom" wrote:

Here you go Helmut:

Sub PrintAndExitIfBlankEmplyeeData()

Dim rng As Range
Set rng = Range("Employees")
If rng.SpecialCells(xlCellTypeBlanks).Cells.Count < 0 Then
Range("Employees").Resize(, 2).PrintOut
Application.DisplayAlerts = False
Application.Quit
End If

End Sub

"Helmut" wrote:

Hi,
I have a RANGE "Employees" with some missing info:

Column A Columns B Column C
21823059 גדעון לי*א 474
27640374 מיעארי טארק 474
36095008 מורא*י רים 474
15786791 פוקס מיכל blank cell
27820257 הראל שלומציון blank cell
28488567 אר*פרוי*ד רו*ית blank cell

I would like that IF NO blank cells in Range THEN continue MACRO

but IF blank cells in Range THEN "print" value of cells A and B and Exit
both Worksheet and Excel.