+ Reply to Thread
Results 1 to 4 of 4

VBA .Find Not Working with Formula

  1. #1
    Registered User
    Join Date
    04-17-2019
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2013
    Posts
    3

    Smile VBA .Find Not Working with Formula

    Hello,

    I'm working on a dynamic valuation model with 80+ worksheets. The 'Settings' worksheet has numerous check boxes to determine which sheets need to be visible or hidden. Within in sheet, there are rows that only need to be shown if the corresponding account detail 'sheet' is visible and a column that will alert the user if they need to 'HIDE' the row.

    For example: lets assume on a Balance Sheet it lists 'vehicles and cars' as a row but if the 'vehicles and cars' detail sheet is hidden there would be an indicator on the Balance Sheet to 'HIDE' this row as it is not used in the analysis. Hopefully that helps explain the functionality.

    I have the code working for 'hardcoded' cell that = "HIDE" but it doesnt work if 'HIDE' is the result of an IF Statement (continuing the example ... one the column that indicates if a row needs to be hidden would have an equation something like =if( settings sheet checkbox for 'cars/vehicles' = checked, 'blank', 'HIDE').

    I've included an excel sheet, over simplified, but it should show the general understanding. The code was under a module but i moved it to ThisWorksheet. Below is also a copy of the code with comments as to what I was trying to accomplish

    This is my first post - so THANK YOU!!!! everyone who tries to help

    Please Login or Register  to view this content.
    Last edited by thejg89; 05-02-2019 at 02:52 PM.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,743

    Re: VBA .Find Not Working with Formula

    Hi

    Please edit your post and use
    HTML Code: 
    around VBA code.


    Weird...
    Try:
    Please Login or Register  to view this content.
    Last edited by KOKOSEK; 04-17-2019 at 05:01 PM.
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    04-17-2019
    Location
    Detroit, MI
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: VBA .Find Not Working with Formula

    Thanks for the tip on the
    Please Login or Register  to view this content.
    - I didnt know how to get it to display properly. Unfortunately the 'lookin:xlValues' didnt work. When I use and IF statement = "HIDE" it comes up as true. I'm debating doing:

    Please Login or Register  to view this content.
    This works for some reason but I wanted to use the .Find and .FindNext as I'm assuming its faster. But for now I'll have to work with a double For Each with IF Statements nested in the middle

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,104

    Re: VBA .Find Not Working with Formula

    Your problem is this line
    Please Login or Register  to view this content.
    This means that rnCheck does not include cells with formulae.
    Try
    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)

Similar Threads

  1. [SOLVED] Formula Stopped Working (Sum if using left, find, len)
    By pmw19800 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-16-2019, 08:13 AM
  2. [SOLVED] Working on formula to find max values from different columns
    By weaverswonders6 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2017, 01:36 PM
  3. Index Formula to find Multiple Values not working
    By cost9170 in forum Excel General
    Replies: 4
    Last Post: 03-18-2016, 04:35 PM
  4. RIGHT/FIND Formula Not Working
    By alanwu07 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-05-2013, 09:52 PM
  5. Replies: 14
    Last Post: 10-25-2012, 10:33 AM
  6. [SOLVED] My If(Find) Formula is not working!
    By becow13 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 08-17-2012, 02:46 PM
  7. [SOLVED] Formula to find the working days difference between to dates?
    By Mudgeman in forum Excel General
    Replies: 2
    Last Post: 05-15-2006, 02:35 AM

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