+ Reply to Thread
Results 1 to 3 of 3

Update cell formula with in Next - For statement

  1. #1
    Registered User
    Join Date
    05-07-2009
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Update cell formula with in Next - For statement

    First of all automatic calculation is on

    How do i force a cell value to change with in a next - for macro

    I have a cell (D5) that contains a formula.

    When I run
    Please Login or Register  to view this content.
    The vba produces my pdfs but i want to select which pdfs to print according to my cell D5 formula that should change each time we go to Next pi

    but when i run
    Please Login or Register  to view this content.
    I only get one file, but i should get a whole bunch.

    Please help!

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Update cell formula with in Next - For statement

    You could try:
    Please Login or Register  to view this content.
    Edit: although looking at it I don't see how changing the pi selected would change the value of D5?
    Last edited by ragulduy; 04-26-2013 at 09:44 AM.

  3. #3
    Registered User
    Join Date
    05-07-2009
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Update cell formula with in Next - For statement

    Ok so I think you got to the root of the problem but the pdfs wont create, Ill give you the whole picuture and maybe we can get this thing to work.

    i have a multiple sheet workbook with a large data set (600000 rows by 80 ish columns) Summarized in a pivot table,

    I need a pdf of each of the field values (compound)saved into a folder with the compound as the name.

    This code works great with out the if statement, but I also need to limit which ones I pdf, I have a cell near the pivot table that checks the max value in the table
    =MAX($B$12:$AQ$90)

    I want a pdf if this cell is > 0

    If I add the code you recommended the vba runs, and only outputs 1 pdf named the first compound name.

    my guess was that the cell formula was not refreshing or something. i dont know what to do!

    Please Login or Register  to view this content.

+ 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