View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
oakman[_2_] oakman[_2_] is offline
external usenet poster
 
Posts: 1
Default Printing Worksheet only if data exists

Greetings,

I have a list with about 36 names on Sheet 1. (Each of these name
corresponds to a sheet with the same name in the workbook.) Next t
each name on the list, I have entered a formula to show the wor
"PRINT" if any data is present on that sheet or leave the cell blank i
no data is present. I am currently using a For Each ... Then loop t
scan the aforementioned range of cells so that if the word "PRINT
appears next to the sheet name, the corresponding worksheet shoul
print. However, I cannot figure out how to tell the macro to print th
particular worksheet once it finds the word "PRINT". Any pointers ar
very much appreciated. Please help!

Thanks in advance!

Sub PrintMac()
For Each c In Worksheets("Sheet1").Range("SALES").Cells
If c.Value = "Print" Then
Worksheets
With c.Font
.Bold = True
.Italic = True
End With
End If
Next c


End Su

--
Message posted from http://www.ExcelForum.com