Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Returning a list names from a schedule

Hi, I'm working on schedule program for work where I Employee_Name in column
A and Date in row 1. the table then gets filled in with a symbol for the
shift worked or is left blank. I am trying to create a list of the eployees
working each day (i.e. Cell value not blank)

I tried doing a ForEach loop but was obviouly not getting it right. Any
suggestions/comments would be appriciated

Thanbks
Zb Kornecki
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Returning a list names from a schedule

Maybe something like this untested pseudocode.

Sub GenerateList()
dim rw as Long, rng as Range, cell as Range
dim rng1 as Range, cell1 as Range
Dim sh as Worksheet
Dim rw = 2
set sh = worksheets("Schedule")
set sh1 = Worksheets("List")
sh1.Range("A1:C1") = Array("Name","Date","Symbol")
set rng = sh.Range(sh.cells(2,1),sh.cells(2,1).End(xldown))
for each cell in rng
if application.CountA(cell.Entirerow) 1 then
set rng1 = sh.range(cell.offset(0,1),sh.Cells(cell.row,"IV"). End(xltoLeft))

for each cell1 in rng1
if cell1 < "" then
with sh1
cells(rw,1).Value = cell.Value
cells(rw,2).Value = cells(1,cell.column).Value
cells(rw,3).Value = cell1.value
rw = rw + 1
end if
end if
Next
End sub

--
Regards,
Tom Ogilvy



"Zb Kornecki" wrote:

Hi, I'm working on schedule program for work where I Employee_Name in column
A and Date in row 1. the table then gets filled in with a symbol for the
shift worked or is left blank. I am trying to create a list of the eployees
working each day (i.e. Cell value not blank)

I tried doing a ForEach loop but was obviouly not getting it right. Any
suggestions/comments would be appriciated

Thanbks
Zb Kornecki

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Returning a list names from a schedule

Thank you I'll work w/ this and see how it works Zb

"Tom Ogilvy" wrote:

Maybe something like this untested pseudocode.

Sub GenerateList()
dim rw as Long, rng as Range, cell as Range
dim rng1 as Range, cell1 as Range
Dim sh as Worksheet
Dim rw = 2
set sh = worksheets("Schedule")
set sh1 = Worksheets("List")
sh1.Range("A1:C1") = Array("Name","Date","Symbol")
set rng = sh.Range(sh.cells(2,1),sh.cells(2,1).End(xldown))
for each cell in rng
if application.CountA(cell.Entirerow) 1 then
set rng1 = sh.range(cell.offset(0,1),sh.Cells(cell.row,"IV"). End(xltoLeft))

for each cell1 in rng1
if cell1 < "" then
with sh1
cells(rw,1).Value = cell.Value
cells(rw,2).Value = cells(1,cell.column).Value
cells(rw,3).Value = cell1.value
rw = rw + 1
end if
end if
Next
End sub

--
Regards,
Tom Ogilvy



"Zb Kornecki" wrote:

Hi, I'm working on schedule program for work where I Employee_Name in column
A and Date in row 1. the table then gets filled in with a symbol for the
shift worked or is left blank. I am trying to create a list of the eployees
working each day (i.e. Cell value not blank)

I tried doing a ForEach loop but was obviouly not getting it right. Any
suggestions/comments would be appriciated

Thanbks
Zb Kornecki

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
return a list of names, from a large list of repeated names. The Fru Fru Excel Worksheet Functions 5 December 10th 08 01:03 PM
I want to make a weekend schedule without duplication of names Margaret Excel Discussion (Misc queries) 1 July 16th 07 07:50 PM
create a schedule without repeating names marilynn Excel Discussion (Misc queries) 1 July 16th 07 06:06 AM
create a random list of names from a list of names in EXCEL Givvie Excel Worksheet Functions 2 October 23rd 06 05:10 AM
find names on list 1 in list 2. list 1 4000 names list 2 400 name Ed Excel Worksheet Functions 1 September 4th 05 12:48 AM


All times are GMT +1. The time now is 04:42 PM.

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"