+ Reply to Thread
Results 1 to 2 of 2

Help?? After I run a macro, cells with "macro-formulas/functions" show "#VALUE!"

  1. #1
    Registered User
    Join Date
    05-22-2015
    Location
    Omaha, NE
    MS-Off Ver
    2010
    Posts
    2

    Help?? After I run a macro, cells with "macro-formulas/functions" show "#VALUE!"

    Hi! I am a novice to excel macros, and my first time posting here, but have learned much over the last few months! Thanks in advance for everyone's help.

    On the workbook I'm working on now, I have several macros that need to be run throughout the day to import new data into the workbook. Lots of the data comes with conditional color formatting, and I imported the "modColorFunctions" module from Chip Pearson to identify and count cells with conditional color formatting. Then I used a formula in specific cells to call the function and identify/count those cells.

    Everything works great, until I run another macro to import more data. The cells with the formula to call the function and count the conditionally colored cells show a value of "#VALUE!". BUT when I type anything into ANY cell in the workbook and hit enter, the function cells then calculate everything correctly.

    I'm building this workbook for a large group and don't want them to have to have a "work-around" every time they import new data. Any idea how to make excel run these functions automatically?

    The "function-cells" have the following formula, where "Countcolor" is the function:
    =IF(C20<>"",(Countcolor($J25,3,FALSE)+Countcolor($AF25,3,FALSE)+Countcolor($AF25,6,FALSE)+Countcolor($AI25,3,FALSE)+Countcolor($AK2 5,3,FALSE)+Countcolor($AL25,3,FALSE)+Countcolor($AE25,3,FALSE)+Countcolor($AE25,6,FALSE)+Countcolor($AR25,3,FALSE)),"")

  2. #2
    Registered User
    Join Date
    05-22-2015
    Location
    Omaha, NE
    MS-Off Ver
    2010
    Posts
    2

    Re: Help?? After I run a macro, cells with "macro-formulas/functions" show "#VALUE!"

    Found the answer:
    I just tacked on "Application.Calculate" at the end of the VBA macro that was causing the problem, and it worked.

    I also found the following:

    'recalculate all open workbooks
    Application.Calculate

    'recalculate a specific worksheet
    Worksheet(1).Calculate

    ' recalculate a specific range
    Worksheet(1).Columns(1).Calculate

    'recalculate everything
    Application.CalculateFull

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel 2010 -- "Visual Basic" "Macros" and "Record Macro" all disabled.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2017, 06:11 AM
  2. Short "Basic" Macro to copy and paste formulas "N" times.
    By gradyhawks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-09-2014, 02:34 PM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. How can i copy value from "HTMLText"(EMBED("Forms.HTML:Text","")),using Macro
    By andrewyang in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2010, 12:47 AM
  5. Replies: 5
    Last Post: 06-26-2006, 09:23 PM

Tags for this Thread

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