OptionControl Button2

berenger

Board Regular
Joined
Jun 6, 2011
Messages
50
I have two optionControl buttons the code for OptionControl Button is working fine but when I select OptionControl Button2 it is supposed to Hide the value of just that row that it is on. Instead it is hiding all data in each cell. Cell P1 is empty and that is what I want this formula to do each time OptionButton2 is selected. But if say row 4 has OptionButton1 selected then I want it to show the value designated by this formula.

Code:
If Sheets("Scan Here").Range("O4") = True Then Range("H2").Value = Sheets("Labels1").Range("N1")

Please help with me with this code.

Code:
If Sheets("Scan Here").Range("O2") = False Then Range("B2").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O3") = False Then Range("E2").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O4") = False Then Range("H2").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O5") = False Then Range("K2").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O6") = False Then Range("B6").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O7") = False Then Range("E6").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O8") = False Then Range("H6").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O9") = False Then Range("K6").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("P1") = False Then Range("B10").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O11") = False Then Range("E10").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O12") = False Then Range("H10").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O13") = False Then Range("K10").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O14") = False Then Range("B14").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O15") = False Then Range("E14").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O16") = False Then Range("H14").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O17") = False Then Range("K14").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O18") = False Then Range("B18").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O19") = False Then Range("E18").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O20") = False Then Range("H18").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O21") = False Then Range("K18").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O22") = False Then Range("B22").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O23") = False Then Range("E22").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O24") = False Then Range("H22").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O25") = False Then Range("K22").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O26") = False Then Range("B26").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O27") = False Then Range("E26").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O28") = False Then Range("H26").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O29") = False Then Range("K26").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O30") = False Then Range("B30").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O31") = False Then Range("E30").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O32") = False Then Range("H30").Value = Sheets("Labels1").Range("P1")
If Sheets("Scan Here").Range("O33") = False Then Range("K30").Value = Sheets("Labels1").Range("P1")
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,224,518
Messages
6,179,261
Members
452,901
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top