Hide or display column depending on cell content

N

Niko

Hi,

Can anyone help me with the following?

I want to design a questionnaire for 10 - 20 people in a spreadsheet.
But I don't want those people to have a look at the others's answers,
because I don't want them to influence each other.
I am thinking of the following way to do that:
In column A, I put the questions. They of course are to be seen by
everybody. Besides, in the top part of column A, I have an empty cell (say,
A1) in which every participant can put a password: the password varies for
everyone.
The answers are to be filled in in the columns, B, C, etc. In cell B1, C1,
etc. the passwords are stored: they are different for each column.

Now, what I want is that all columns (starting from B) are hidden. If
someone enters in A1 the password of, say, column D, automatically column D
is displayed. And as soon as you change or delete this password in A1,
column D hides again.

So, I need something like:
if D1=A1 then column D is displayed else column D is hidden.
And of course this should be true for about 20 columns, starting from B.
All this without having to press a button, etc., because I want it to be as
userfriendly as possible.

Is this possible?

Niko
 
T

Tyla

Some thoughts on this:
- Simply hiding columns depending on the content of a cell can easily
be done using a macro. Users, however, can trivially unhide the hidden
(sic) rows unless you password protect the worksheet. That, in turn,
makes the macro more complicated since you have to protect/unprotect
the worksheet continually.
- As an alternative, you might have the users simply fill in the
answers, and put a button on the worksheet which, when pressed, copies
their answers to a new column in a hidden worksheet and then clears
the answer cells to await the next user. You'll probably want to hide
the worksheet using the "xlVeryHidden" attribute and password protect
the VBA module -- each of which is a one-time deal -- but after that
the macro behind the button is pretty straight-forward.

/ Tyla /
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top