- Populate values in textbox based on combobox ,optionbutton
- Based on the values in cells b77 b81 ✓ - Excel Forum
- Pate values - Office Software Forum
- #Value - Excel Forum
- Return Seq Values Until Blank value then return different set of seq values ✓ - Excel Forum
- VBA Macro to calculate values in cell(s) from multiple sheets - Excel Forum
Click on column F on sheet 3 and insert a column so that the PCR values from sheet 1 and 3 are both in column G.
Now go to your code and look for (code line 6):
ws = Array("sheet1", "sheet2", "sheet3")
And place the following lines below it:
If Me.OptionButton1 Then ws = Array("sheet1", "sheet2") If Me.OptionButton2 Then ws = Array("sheet1", "sheet3")
Well you can, just thought this would be the easiest way. You know you can hide the empty column.
Anyway, without inserting an empty column, look for code line 32:
Me.TextBox2.Value = c.Offset(, 5).Value
And replace it with:
If n = 0 Then Me.TextBox2.Value = c.Offset(, 5).Value If n = 1 Then Me.TextBox2.Value = c.Offset(, 4).Value
Do this along with the previous mentioned adjustment to your code.