Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel shading V grid lines

Status
Not open for further replies.

Manic

Programmer
Feb 28, 2001
343
GB
Is there any way to show both??


I have a lot of files to convert from quattro pro to excel and the last thing that I need to do is get the shading on then to break up the many lines of results.

is there any way of doing this while still keeping the grid lines?

I have searched google but to no avail.

thanks

___________________
Manic
 
Hi,

Select the area of interest.

Format/Cells/Borders Tab - add watever gridlines you want.

Skip,

[glasses] [red]Be advised:[/red] Researchers have found another Descartes trueism, "Cogito ergo spud."
"I think; therefore, I YAM!
[tongue]
 
In the ThisWorkbook module of each file
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Cells.FormatConditions.Delete
    Application.OnTime Now + 0.000001, "CondFormat"
End Sub

In a normal module in each file
Code:
Sub CondFormat()
    Cells.FormatConditions.Add Type:=xlExpression, Formula1:= _
        "=MOD(ROW(),2)=0"
    Cells.FormatConditions(1).Interior.ColorIndex = 35
End Sub

Note, this assumes no other conditional formatting on the sheets, and after printing this will apply the formatting to ANY sheet you print from those books, even if it didn't have it to start with.

Regards
Ken................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
And if you want to see it before you have printed then obviously you need to apply the conditional formatting first :)

Fomrat / Cond Formatting / Change 'cell value is' to 'formula is', put in =MOD(ROW(),2=0) and choose a nice pastel green from the patterns tab and hit OK.

Regards
Ken.................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top