Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting a value based on another Cell value 3

Status
Not open for further replies.

pryest

Programmer
Dec 26, 2006
24
US
I am sure this is a simple problem to solve. I am just not sure the what would be the best way. I have a worksheet that is being used as a survey. Each question has a Cell with a Yes/No drop down list. For each question I have a cell for comments under it. When the User select No for a question. I would like to have a Message show in the "comment" cell to remind the user to supply comments. I don't know if I should just use a IF statement to accomplish this task or is there a better way? Does anyone have any suggestions?

Mike
 



Hi,

You can put a formula in a cell to return a value based on another value.
[tt]
=IF(A1="NO","Put your comment here.","")
[/tt]
But once the user enters something THERE, the formula is desctroyed. If that's NOT okay, then you will need to program your application in VBA.

In that event, please post your question in VBA Visual Basic for Applications (Microsoft) Forum707.

Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Thanks Skip. I will post in VBA for a solution. I have the IF statment working but I hate that the user see the formula in the field when they go to enter comments. I don't want to confuse anyone.

thanks

Mike
 
So add another column to your reponse area right at the front, make it extremely slim, eg 0.1 or something, and then put the formula in there. Then just protect the sheet and tick the 'hidden' option (Excluding the entry cells) and they will not see the formulas.

You can also add to the formula such that if they do add a comment, the reminder disappears, eg

=IF(AND(A1="NO","B1<>""),"Put your comment here.","")

What they see will appear to come from the cell you want them to enter the comment in, especially if you add a couple of leading spaces to the comment.

Regards
Ken............



----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Nice, simple, non-VBA answer.

Hava
star.gif
on me, Ken.

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Ken Wright
that's really bright
solution so far
So, have a star
You deserve it outright


ah, if only I could have been a poet instead of a technical junkie

Member- AAAA Association Against Acronym Abusers
 
LOL:-

You missed your calling, I'm pretty sure,
It should be poetry for you, and nothing more.
Give up this life of computers every day,
And spend your time in a creative way.

:)

Regards
Ken.............

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 

Newbies come, and Newbies go,
but Wizards always steal the show!
"Macro That!" and "Macro This!"
But newbie asks, what means Ifs()?

OZ exhales, and slowly explains,
to retarded VBA,
Dorothy is only here because
Y'all kept screaming
"Dot.com, Dot.com"


Pote, ex-trolled-in-here

[green]Tis far easier to keep your duck in a row if you just have the one.[/green]
 
LOL


----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]
----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top