I have a spreadsheet that essentially mirrors a survey form. The
user puts information in the cells (fields) and I have their
responses rollup up to a summary sheet. In the summary sheet I've
placed the category (field) names across the top. On the input sheet
there are some categories that have several responses and I've
handled that by putting a series of check boxes there with a label
name next to it. The functionality of migrating the information to
the summary sheet is working fine. My code finds the next blank cell
in that column and pastes the response. The troubles begin when my
user UNCHECKS the box. When that occurs I want the response removed
from the column and that's where I'm stuck. I tried getting around
it by recording a macro and using find and replace but it seems like
there has to be a easier way. I'm posting a sample of my code below:
Private Sub CheckBox1_Change()
Dim NextRow As Integer
If CheckBox1.Value = True Then
NextRow = Worksheets!Sheet2.Range("f65536").End(xlUp).Row + 1
Application.Worksheets("Sheet2").Cells(NextRow, 6) = "East"
End If
'If CheckBox1.Value = False Then
'Application.Worksheets("Sheet2").Cells(2, 6) = " "
'End If
End Sub
Private Sub CheckBox2_Change()
Dim NextRow As Integer
If CheckBox2.Value = True Then
NextRow = Worksheets!Sheet2.Range("f65536").End(xlUp).Row + 1
Application.Worksheets("Sheet2").Cells(NextRow, 6) = "West"
End If
'If CheckBox2.Value = False Then
'Application.Worksheets("Sheet2").Cells(2, 6) = " "
'End If
End Sub
Private Sub CheckBox3_Change()
Dim NextRow As Integer
If CheckBox3.Value = True Then
NextRow = Worksheets!Sheet2.Range("f65536").End(xlUp).Row + 1
Application.Worksheets("Sheet2").Cells(NextRow, 6) = "North"
End If
End Sub