Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
townieflo
 
Posts: n/a
Default View only items in the left column that have X's in right columns

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
bob777
 
Posts: n/a
Default View only items in the left column that have X's in right columns


I think the reason you have no replies is that the problem is not
understood. Could you give an example such cells A1 to A5 contain the
names of 5 items of equipment, cells B1 to B5 contain X's or Y's, cells
C1 to C5 contain X's or Z's.

I want to be able to.....................


--
bob777
------------------------------------------------------------------------
bob777's Profile: http://www.excelforum.com/member.php...o&userid=28504
View this thread: http://www.excelforum.com/showthread...hreadid=487517

  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default View only items in the left column that have X's in right columns

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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
Stack multiple columns into one column... is there an easy way? Julian Excel Discussion (Misc queries) 2 September 16th 05 07:31 PM
Lookup Table Dilemma Karen Excel Worksheet Functions 2 June 10th 05 08:22 PM
print 3 column range in six columns dawgpilot Excel Discussion (Misc queries) 3 April 28th 05 10:53 PM
How can I see column headings of hidden columns in Excel before u. Beachcomber Excel Discussion (Misc queries) 10 December 10th 04 01:35 PM


All times are GMT +1. The time now is 01:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"