Excel function/macro

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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.
 
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.
 

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.
 

Attachments

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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Top