Consulting

Results 1 to 2 of 2

Thread: Simple macro - loop to write value from column to another cell, then save as PDF

  1. #1
    VBAX Newbie
    Joined
    Oct 2014
    Posts
    2
    Location

    Simple macro - loop to write value from column to another cell, then save as PDF

    Hey there, hoping you can help me piece together the code to create a simple macro. I have an Excel spreadsheet that acts as a simple statement generator by populating a number of cells based on a VLOOKUP against a master list of account numbers.

    The user enters the 4-digit account number, and the VLOOKUP formulas on a separate tab of the workbook bring back the required values (ie. Customer Name, Address, Balance, etc) from the master list.

    Rather than have the user spend time entering an account number, and manually saving a PDF, I'm hoping to create a macro that does those steps for them. Desired process would look like this:

    1) User pastes list of account numbers in COLUMN L on 'Entry' sheet
    2) User enters a desired file path in cell A5 (location where PDF's will be saved)
    3) User clicks a button to start the macro
    4) Macro reads first account number in COLUMN L and writes it to cell H7
    5) Macro moves to separate sheet called 'Renewal Letter' and saves the sheet as a PDF, with the same filename as the text in cell K6
    6) Macro moves back to 'Entry' and writes the next account number from COLUMN L to cell H7
    ....and the loop of steps 5) and 6) continues until the entire list in COLUMN L has been completed


    Thanks in advance for any help!

  2. #2
    VBAX Newbie
    Joined
    Oct 2014
    Posts
    2
    Location
    Disregard, figured it out, thanks!
    Last edited by bman84; 10-06-2014 at 09:40 AM.

Posting Permissions

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