![]() |
#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. |
#2
|
||||
|
||||
![]()
Do not crosspost your question on multiple forums without including links here to the other threads on other forums.
Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post. Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you! Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
![]() |
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 |