Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Can I automatically add or delete cells based on IF statements

Is it possible to set up a cell with a drop down menu selection of "Yes" and
"No" such that the selection of "yes" or "no" causes the spreadsheet to
display or hide additional cells with text. I am trying to set up a form
that contains questions that can be answered as yes or no. If the answer is
yes, I want to display a series of additional questions. Another way would
be to have an answer of "no" cause some of the cells with additional
questions to disappear. Can this be done?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,089
Default Can I automatically add or delete cells based on IF statements

One way: set the colour of the font to the same as the background, for
example, white on white. Then use Conditional Formatting on all the cells.
If the value on the drop down box is "yes" then set the font colour to
automatic.

Conditional Formatting | Formulas is: =$A1="yes" Format | Font |
Colour: Automatic

Regards

Trevor


"Mike in OH" <Mike in wrote in message
...
Is it possible to set up a cell with a drop down menu selection of "Yes"
and
"No" such that the selection of "yes" or "no" causes the spreadsheet to
display or hide additional cells with text. I am trying to set up a form
that contains questions that can be answered as yes or no. If the answer
is
yes, I want to display a series of additional questions. Another way
would
be to have an answer of "no" cause some of the cells with additional
questions to disappear. Can this be done?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Can I automatically add or delete cells based on IF statements

Yep.

You could use data|Validation to allow only yes/no and a worksheet event that
would run when a cell changed.

Debra Dalgleish has some notes for data|validation:
http://www.contextures.com/xlDataVal01.html

Chip Pearson has notes about worksheet events:
http://www.cpearson.com/excel/events.htm

David McRitchie's notes:
http://www.mvps.org/dmcritchie/excel/event.htm

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm


Mike in OH wrote:

Is it possible to set up a cell with a drop down menu selection of "Yes" and
"No" such that the selection of "yes" or "no" causes the spreadsheet to
display or hide additional cells with text. I am trying to set up a form
that contains questions that can be answered as yes or no. If the answer is
yes, I want to display a series of additional questions. Another way would
be to have an answer of "no" cause some of the cells with additional
questions to disappear. Can this be done?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default Can I automatically add or delete cells based on IF statements

You could have something like:

=IF(A1="Yes","Another question ...","")

Hope this helps.

Pete

Mike in OH wrote:
Is it possible to set up a cell with a drop down menu selection of "Yes" and
"No" such that the selection of "yes" or "no" causes the spreadsheet to
display or hide additional cells with text. I am trying to set up a form
that contains questions that can be answered as yes or no. If the answer is
yes, I want to display a series of additional questions. Another way would
be to have an answer of "no" cause some of the cells with additional
questions to disappear. Can this be done?


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically update cells Maddoktor Excel Discussion (Misc queries) 1 December 8th 05 12:56 AM
Adjust the size of cells automatically Dajana Excel Discussion (Misc queries) 1 September 6th 05 02:56 PM
Automatically filling in cells based on another cell's content Ginger Excel Worksheet Functions 5 September 2nd 05 09:17 AM
locking cells based on results at runtime aken Excel Worksheet Functions 3 June 22nd 05 02:01 PM
Protected cells -automatically format to a different color Fred Evans Excel Discussion (Misc queries) 9 December 3rd 04 12:59 PM


All times are GMT +1. The time now is 06:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"