![]() |
#1
|
|||
|
|||
![]()
Hello Folks,
I am trying to do something for a organization I do volunteer work and I can not get my head around this one. We use a excel workbook that contains the names of the volunteers that come to work with us and we provide them a listing of their volunteer hours and and task for each month of the year. We have a workbook that we use for this in the following way: There are 14 sheets in total, where:
As volunteers come and go our list continues to grow and we keep their info indefinitely. So our list has grown pretty big and we just can not print everyone's info all the time especially those that are no longer active volunteers (Range E2:E501). Someone provided the following code to me: Sub PrintAll_IDs() For Each myCell In Worksheets(2).Range("L2:L501") 'range with stored ID's Worksheets(5).Range("C5") = myCell.Value ' "C5" is the cell with ID that we change manually now Worksheets(5).PrintOut Next myCell End Sub This code works but it prints everything even those volunteers that are no longer active and it will not stop till it is done. Range("E2:E501") and Range("N2:N501") in Worksheets(2) (that is the data sheet with all the volunteer info) contains the info I need to filter out those volunteers that no longer need to be printed out. So I am stumbling around trying to see how I get this to work. Any help will be much appreciated. Sorry for what may be a very simple problem but I am really new at VBA. Thanks folks. |
Tags |
cell value, print, vba |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
wmedjaxnjr | Excel | 1 | 04-09-2016 04:22 PM |
Hide a combo box (form control), based on a cell value - Excel 2010 | jaymudda | Excel Programming | 9 | 07-12-2015 10:59 AM |
Can anyone here tweek this macro for renaming Excel files based on a cell's contents? | chrisd2000 | Excel Programming | 6 | 07-01-2014 01:53 PM |
![]() |
MSofficeBLUE | Excel | 2 | 10-15-2013 09:51 PM |
Change formula cell range based on cell value | Scoth | Excel | 4 | 10-25-2012 07:51 AM |