Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi there,
On a form if a checkbox is selected (TRUE) then I want the answer in A1 to be $10.50. If not checked (FALSE) I want the answer in A1to be $2.50. How do I do this? Thanks in advance! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Use a linked cell with that checkbox.
And then you can use a formula that points at that linked cell: =if(x222=true,10.50,2.50) (x222 is my linked cell.) Sunlover wrote: Hi there, On a form if a checkbox is selected (TRUE) then I want the answer in A1 to be $10.50. If not checked (FALSE) I want the answer in A1to be $2.50. How do I do this? Thanks in advance! -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
It would work something like this:
if checkbox1.value = true then cell.(A1).value = $10.50 else cell(A1).value = 2.50 end if HTH Thanks, Roger "Sunlover" wrote: Hi there, On a form if a checkbox is selected (TRUE) then I want the answer in A1 to be $10.50. If not checked (FALSE) I want the answer in A1to be $2.50. How do I do this? Thanks in advance! |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Roger,
Thanks for the quick response. However, below is exactly what I entered, but an error keeps popping up that says: Compile Error: Sub or Function not defined1: Private Sub CheckBox1_Click() If CheckBox1.Value = True Then cell(A1).Value = 10.5 Else cell(A1).Value = 2.5 End If End Sub Any suggestions? "Roger Converse" wrote: It would work something like this: if checkbox1.value = true then cell.(A1).value = $10.50 else cell(A1).value = 2.50 end if HTH Thanks, Roger "Sunlover" wrote: Hi there, On a form if a checkbox is selected (TRUE) then I want the answer in A1 to be $10.50. If not checked (FALSE) I want the answer in A1to be $2.50. How do I do this? Thanks in advance! |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub CheckBox1_Click()
If me.CheckBox1.Value = True Then me.range("A1").Value = 10.5 Else me.range("a1").Value = 2.5 End If End Sub I like to qualify the objects (both the checkbox and the range), but that wasn't the real problem. me.cells(1,1).value = 10.5 would have worked ok, too. Sunlover wrote: Hi Roger, Thanks for the quick response. However, below is exactly what I entered, but an error keeps popping up that says: Compile Error: Sub or Function not defined1: Private Sub CheckBox1_Click() If CheckBox1.Value = True Then cell(A1).Value = 10.5 Else cell(A1).Value = 2.5 End If End Sub Any suggestions? "Roger Converse" wrote: It would work something like this: if checkbox1.value = true then cell.(A1).value = $10.50 else cell(A1).value = 2.50 end if HTH Thanks, Roger "Sunlover" wrote: Hi there, On a form if a checkbox is selected (TRUE) then I want the answer in A1 to be $10.50. If not checked (FALSE) I want the answer in A1to be $2.50. How do I do this? Thanks in advance! -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dave,
You are amazing! Just what I was looking for :) Thanks so much!!! "Dave Peterson" wrote: Private Sub CheckBox1_Click() If me.CheckBox1.Value = True Then me.range("A1").Value = 10.5 Else me.range("a1").Value = 2.5 End If End Sub I like to qualify the objects (both the checkbox and the range), but that wasn't the real problem. me.cells(1,1).value = 10.5 would have worked ok, too. Sunlover wrote: Hi Roger, Thanks for the quick response. However, below is exactly what I entered, but an error keeps popping up that says: Compile Error: Sub or Function not defined1: Private Sub CheckBox1_Click() If CheckBox1.Value = True Then cell(A1).Value = 10.5 Else cell(A1).Value = 2.5 End If End Sub Any suggestions? "Roger Converse" wrote: It would work something like this: if checkbox1.value = true then cell.(A1).value = $10.50 else cell(A1).value = 2.50 end if HTH Thanks, Roger "Sunlover" wrote: Hi there, On a form if a checkbox is selected (TRUE) then I want the answer in A1 to be $10.50. If not checked (FALSE) I want the answer in A1to be $2.50. How do I do this? Thanks in advance! -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Increase size of a Forms Check Box (click on to enter check mark) | Excel Discussion (Misc queries) | |||
Check if Conditional Format is True or False / Check cell Color | Excel Worksheet Functions | |||
Enable check box in protected sheet + group check boxes | Excel Discussion (Misc queries) | |||
I need help with macros and check boxes. | New Users to Excel | |||
Macros to delete check boxes | Excel Discussion (Misc queries) |