OK, I have a piece of code that colors cells based on their expiration date:
What I want to do is add a macro that prints the ROWS with those specifically colored columns.Public Sub Expiring_Dates () x = Cells(Rows.Count, 1).End(xlUp).Row For a = 1 To x For b = 1 To 3 If Cells(a, b) >= Now() + 7 And Cells(a, b) <= Now() + 14 Then Cells(a, b).Interior.ColorIndex = 6 ElseIf Cells(a, b) <= Now() + 7 Then Cells(a, b).Interior.ColorIndex = 3 End If Next b Next a End Sub
I have:
I just don't know what to place after the equal sign to get it to do what I want. Can anybody help me?Sub Printer_Function () ActiveSheet.PageSetup.PrintArea = End Sub
Hello Eddie barzoon,
Are both colors to printed or only one? How much of the row is to be included in the printing, ie. what is the last column in the row?
Sincerely,
Leith Ross
I would write a routine that hid the rows with the wrong colors, then printed, then unhid the rows.
Originally Posted by Leith Ross
Yes, any row that contains that color, they are red and yellow, would need to print. The last column in the row is the tenth column or column J.
Originally Posted by mikerickson
Mind helping me with that?![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks