Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pulling Data from one sheet based on value of column

This is what I have:
Worksheet that basically has Columns A:Q with headers Last Name, First Name,
Badge Number, Supervisor, etc. and then the rest contain course names such as
Hazcom, Hazmat, etc.

The way that I have the sheet set up is if a user "John Doe" with
Supervervisor "XYZ" has taken a course they get a 1 if they haven't they get
a 0. What I need to do is on seperate sheets within the workbook based on the
course and if they contain a 0 generate a list including (Last Name, First
Name and Supervisor "columns A, B, and F" for instance). So if there are 12
different courses it would generate 12 different sheets such as Hazcom,
Hazmat, etc.

Any help would be greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Pulling Data from one sheet based on value of column

Assuming row 1 contains the same course names as the sheets. You have to add
the sheet for each course manually. I randomly picked columns 5 To 10 to
contain the 0's. Change this statement as necessary.


Sub missingcourses()

With Sheets("Summary")

Lastrow = .Cells(Rows.Count, "A").End(xlUp).Row
'setup columns to check for 0's
For ColumnCount = 5 To 10
CourseRowCount = 1
For RowCount = 2 To Lastrow

If .Cells(RowCount, ColumnCount) = 0 Then
first = .Cells(RowCount, "A")
last = .Cells(RowCount, "B")
supervisor = .Cells(RowCount, "F")
'assume column headers in row 1 match
'sheet names
With Sheets(.Cells(1, ColumnCount))
.Cells(CourseRowCount, "A") = first
.Cells(CourseRowCount, "B") = last
.Cells(CourseRowCount, "C") = supervisor
CourseRowCount = CourseRowCount + 1
End With
End If
Next RowCount
Next ColumnCount
End With

End Sub

"StevenH78" wrote:

This is what I have:
Worksheet that basically has Columns A:Q with headers Last Name, First Name,
Badge Number, Supervisor, etc. and then the rest contain course names such as
Hazcom, Hazmat, etc.

The way that I have the sheet set up is if a user "John Doe" with
Supervervisor "XYZ" has taken a course they get a 1 if they haven't they get
a 0. What I need to do is on seperate sheets within the workbook based on the
course and if they contain a 0 generate a list including (Last Name, First
Name and Supervisor "columns A, B, and F" for instance). So if there are 12
different courses it would generate 12 different sheets such as Hazcom,
Hazmat, etc.

Any help would be greatly appreciated.

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
Pulling data from other wb based on data to populate dropdown list Suzann Excel Discussion (Misc queries) 0 April 23rd 09 04:29 PM
Pulling an column/row Data from one sheet- another if critria is m Farmer Ted Excel Discussion (Misc queries) 1 January 30th 09 11:09 PM
Pulling data from a Web based program Kim Kautzmann[_2_] Excel Discussion (Misc queries) 0 March 11th 08 12:53 PM
Pulling a value from another sheet, based on date Carlee Excel Worksheet Functions 0 June 11th 07 09:23 PM
Newbie question Pulling data from one sheet to another based on Tony Canevaro New Users to Excel 16 October 25th 05 02:10 PM


All times are GMT +1. The time now is 03:31 AM.

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

About Us

"It's about Microsoft Excel"