• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help to create a rule in excel.

vat123

New Member
Hi,

I have got three columns A,B,C.

A is having two values Yes/No.

What I am trying to achieve is, if the value in column A is Yes. Display columns B and C.

and if the value in column A is No, hide column B and C.


Is it possible to create a rule in excel?
 
Dear Vat123,


What do you mean by "hide column B and C", you can hide the contents but not columns, assume that, if A1 = Yes, then in contents in B1,C1 will display, if A1= No, then contents in B1,C1 will hide means it won't displays. It can be possible by CF, if you meant this, then please confirm.


Thanks

Vijay
 
Vat123


You can either:


1. Use some VBA to hide the B&C Columns based on your criteria

or

2. Use Conditional formatting to make the Text and Background color of Columns B&C the same, without VBA.


Unfortunately I don't have time today to detail the solutions
 
Hi Vijay,


I want to hide the whole column B1 and C1 if the column A1 is No.

The spread sheet i am using is a form.


I don't want the users to fill the column B1 and C1 if the column A1 is No.


Hui,

Sorry ,I am new to excel world and I have no idea in using VBA in excel.


Thanks,

Vat
 
Hi vat123,


Try this little test first to see if this will work for you?


Enter No in A2 and values in B2 and C2, then select cells B2:C2 with the mouse, go to and select Conditional Formatting > New Rule > Use a formula to determine which cells to format. Click Format button, type in the box


=A2="No"


Click the Font tab and in the Colour dropdown select White.


Does that work for you?
 
Dear Oldchippy,


As per Vat123, he wants to hide the entire columns as per his Yes No. criterias, as per your idea, he can hide the contents of the cell.


Dear Vat123,'


Kindly confirm the exact problem, whether you want to hide the entire columns or by applying conditional formating to hide the contents of the cell


Vijay
 
Hi All,


If vat123 in intrested in hiding just contents of a column that can be done simply by:


Code:
IF(A1="Yes",Cell_Contents_Of_B1,"")


...You need to select just Yes/No and it is done.


Regards,

Faseeh
 
Back
Top