Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Manually, you could hide all the columns that you don't want to see, then filter
to show the non-blanks in that column. Then print that "view". Repeat as required. You could have a macro do it, too. Option Explicit Sub testme() Dim iCol As Long Dim myRng As Range Dim LastRow As Long Dim LastCol As Long Dim wks As Worksheet Set wks = Worksheets("sheet1") With wks .AutoFilterMode = False LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row LastCol = .Cells(1, .Columns.Count).End(xlToLeft).Column Set myRng = .Range("a1", .Cells(LastRow, LastCol)) myRng.AutoFilter For iCol = 2 To LastCol .Range("b1", .Cells(1, LastCol)).EntireColumn.Hidden = True .Cells(1, iCol).EntireColumn.Hidden = False If .FilterMode Then .ShowAllData End If myRng.AutoFilter Field:=iCol, Criteria1:="<" If myRng.Columns(1).Cells.SpecialCells(xlCellTypeVisi ble) _ .Cells.Count = 1 Then 'don't print--no data, just header row Else .PrintOut preview:=True End If Next iCol .Range("b1", .Cells(1, LastCol)).EntireColumn.Hidden = False If .FilterMode Then .ShowAllData End If End With End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm townieflo wrote: I'm sure there is a simple function for this. I have a master list of items in my far left column. The columns to their right use various combinations of the masterlist for which I have placed an X within the column in line/the row of the masterlist on the left. How do I get the program to sort or eliminate both the items or rows not with an X from the master list on the left along with eliminating from view all the other columns but the one selected? I want to be able to print individual reports showing how each individual column matchs up with the master list. HELP -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
creating a bar graph | Excel Discussion (Misc queries) | |||
Stack multiple columns into one column... is there an easy way? | Excel Discussion (Misc queries) | |||
Lookup Table Dilemma | Excel Worksheet Functions | |||
print 3 column range in six columns | Excel Discussion (Misc queries) | |||
How can I see column headings of hidden columns in Excel before u. | Excel Discussion (Misc queries) |