Creation of Results Table + Hiding of Sheets and Columns

MelissaBr

New Member
Joined
Oct 4, 2023
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

This thread will have the same question/idea as my first one. Due to my own mistake, the macros I got were not suitable and it was advised to make a new thread with the new information added.
I wanted to make a results file for my team. Currently we are doing everything manually, and I think using macros will make our life easier.

So, the idea:
We will receive a request with a test list, we copy this list to the sheet called "Info" and specify how many samples we need to test.
What I would like to happen next:
  1. In the "Results" sheet, the correct amount of rows will be created, corresponding to the sample amount.
  2. The tests that are NOT marked by an X in the testlist will have their columns hidden and, if applicable, the sheets as well.
Preferably these are 2 separate macros, which I can assign to their own button.

This is what the "Info" sheet looks like:
1696940502763.png

This list currently continues to row 139, but can change every year.
Not all of these codes correspond to a test we perform(some are sample prep or belong to tests of a different team), so those will be hidden to shorten the list.

Next is the "Results" sheet:
1696939692934.png

As you can see, not all tests have a sheet.

Now to the reasons why the macros from my previous thread didn't do exactly what I wanted:

When there is more than 1 sample, the added rows will be separated by a line, I would like this to be a dotted line, see below.
In my original thread I didn't specify this and had a blank row which was a "workaround" for my own code.

1696939880275.png


The second mistake I made was quite big:

In my original thread, all tests only had the number of that test as their sheet-name. In reality they will have this number AND a shortened, easy to understand name. These names are not the same as the test name in the "Info" sheet or the "Results" sheet.
1696940135817.png


Also:
There are 2 sheets that should be visible when both OR either of the mentioned tests are marked in the "Info" sheet.
1696942574427.png


Hopefully this is enough info and someone can help me achieve what I have in mind!

I would like to learn from all of this (so I can be able to come up with something acceptable myself in the future), so if it is possible to explain some of the main parts of the code, that would be much appreciated!

-Melissa
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,223,882
Messages
6,175,166
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top