View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BobR BobR is offline
external usenet poster
 
Posts: 18
Default Selecting portions of a column instead of the whole colum

Hello, XL 2003 and 2007.
Have the code listed below that selects an entire column and then colors and
formats it. My problem is that I don't need the entire column but only D4
down. D4 contains the beginning statement for my pivot table. The length of
the column will be variable and I'm not sure how to put the code in to take
it from D4 down to the last complete cell.

Can someone help with the code, and the coloring is supposed to be for the
range and not the entire column
Thanks
BOB R




ActiveCell.Offset(0, 1).Columns("A:A").EntireColumn.Select
With Selection
.EntireColumn.AutoFit
.HorizontalAlignment = xlCenter
End With
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Selection.Font.Bold = True
Selection.Font.Italic = True