1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Excel function/macro

Discussion in 'Business Applications' started by office38, Jan 8, 2013.

Thread Status:
Not open for further replies.
Advertisement
  1. office38

    office38 Thread Starter

    Joined:
    Dec 22, 2012
    Messages:
    4
    Hi all

    I'm hoping that someone can tell me that what I'm trying to acheive is possible and fairly easy to do with an "IF" function.

    I have a large workbook that I use to price construction work with. It is made up of a worksheet in which I input all the dimensions, which then auto-populate items in 14 additional worksheets to produce an overall cost.

    Over the years, items have been added to the whole workbook in order to cover every type of construction. As a general rule I only require 28% of the items for any given job.

    My question is this;

    Can I add a column to me dimension sheet against each item in order to hide sections of the workbook that I do not require.

    For example;

    If "dimensions sheet" rows A10 to A44 are not required (Yes or No dropdown menu, which I can do), if "No" hide "Super-Structure sheet" rows 102 to 167.

    Hope that makes sense and thank you in advance for any help provided.
     
  2. CDHarm

    CDHarm

    Joined:
    May 26, 2011
    Messages:
    255
    Hi,

    I do not know if a formula can be used, but you can use a code to hide or unhide the desired rows.
    It's a matter of knowing when to Hide/Unhide.
    If you can provide a redacted copy and sample we can better determine your request.
     
  3. office38

    office38 Thread Starter

    Joined:
    Dec 22, 2012
    Messages:
    4
    Hi CDHarm

    Thank you for your reply. If you look at the attached file, examples of what I'm trying to acheive are;

    If Dimensions A16 = No, hide sheet 1 rows 19 to 38.

    If Dimensions A32 = No, hide sheet 1 rows 39 to 43.

    If Dimensions A109 = No, hide sheet 2 rows 119 to 130.

    If Dimensions A121 = No, hide sheet 2 rows 120 to 128.

    Any help you could offer would be appreciated.
     

    Attached Files:

  4. CDHarm

    CDHarm

    Joined:
    May 26, 2011
    Messages:
    255
    Hi,

    THe examples you gave will there be more than just the ones you posted?
     
  5. Garf13LD

    Garf13LD

    Joined:
    Apr 17, 2012
    Messages:
    455
    You can use an additional column to tie the value to the check cell.
    Eg.
    Sheet1 R19:R38 = Dimensions!$A$16
    So if A16=No, then R19:R38 will also be no.
    Then write a sub and embedded into sheetactivate event.
    That means every time sheet1 is active, this macro will check for the values "No" in column R and then hide the entire row.
     
  6. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1084304

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice