Help adding a condition to a print code

P

Paul S

I am using excel 200

I am using this code to print staff holiday forms

Sub PrintHolidayForms(

Dim lngLoop As Lon
Dim rngItems As Rang

Set rngItems = Worksheets("Holida
Entitlement").Range("ConsultantName"

Worksheets("Holiday Form").Selec
ActiveSheet.Unprotec
For lngLoop = 1 To rngItems.Rows.Coun

Range("E3") = rngItems.Cells(lngLoop, 1
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=Tru

Nex
ActiveSheet.Protec


End Su

The range ConsultantName is a dynamic range and contains the staf
names, starting in cell B4, the range also contains the words "Vacant
and "Proposed", how do I stop the Vacant and Proposed printin

eg in the list below I only want it to print a form for John and Fre
Joh
Vacan
Propose
Fre

Th

Pau
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top