I'm trying to create a cell whose value is 3

Microsoft Microsoft office excel 2007 -...
June 9, 2010 at 13:30:32
Specs: Windows Vista
I'm trying to create a cell whose value is 3 but would like when some types in it YES to be equal to it 3?

What can I do?


See More: Im trying to create a cell whose value is 3

Report •


#1
June 9, 2010 at 17:01:49
You can not have a value and a formula in a cell, it's either a value or a formula.

You could do something along the lines of:

In Cell A1 enter the text YES
In Cell B1 enter the formula: =if(A1="YES",3,"")

MIKE

http://www.skeptic.com/


Report •

#2
June 9, 2010 at 19:15:08
I'm not quite sure I understand everything you are trying to do, but if you want A1 to display 3 if someone types in "YES" this will do that:

Right click the sheet tab and paste this into the pane that opens:

Private Sub Worksheet_Change(ByVal Target As Range)
 If Target.Address = "$A$1" Then
  If UCase(Target) = "YES" Then
   Target = 3
  End If
 End If
End Sub


Report •

Related Solutions


Ask Question