+ Reply to Thread
Results 1 to 5 of 5

Need a macro that references a list and then prints data retrieved

  1. #1
    Registered User
    Join Date
    01-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Need a macro that references a list and then prints data retrieved

    Can someone help me please. I am needing a macro that will go through a range of departments on "dept" tab and put the dept number in cell A5 of the "Expenses" tab and then print the Expenses. As the department number changes I have a database that will retrieve new data for each department so I am wanting to print after each department's data is populated.
    In addition, if anyone knows how I could email instead of print based on a range of mail reciepients tied to each department would be great. My email platform is Lotus Notes.
    Thanks in advance.
    Attached Files Attached Files
    Last edited by Crimson Bourne; 01-13-2012 at 10:56 AM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need a macro that references a list and then prints data retrieved

    Based on your example, this would cycle through the dept codes and print the Expenses sheet.

    Please Login or Register  to view this content.

    No clue on Lotus Notes.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    01-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need a macro that references a list and then prints data retrieved

    JBeaucaire - this worked great for the file that I uploaded. However, my actual dept list has depts such as "0502.100" and when the macro cycles through the list it drops the zero in front and will not refresh the data.

    thanks for the help

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Need a macro that references a list and then prints data retrieved

    Format cell A5 as TEXT instead of GENERAL. Then try again.

  5. #5
    Registered User
    Join Date
    01-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Need a macro that references a list and then prints data retrieved

    Quote Originally Posted by JBeaucaire View Post
    Format cell A5 as TEXT instead of GENERAL. Then try again.
    That did it. Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1