If cell is checked, then list ondifferent worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

On sheets 1 through 6, I have a list of items in col A and a description in
column C. If column B contains an X or checkmark, I want to list the
descriptions from column C on a sheet called Summary. (Can update sheet 7
once sheets 1 thorugh 6 have been filled out by the user.) I need to be able
to easily add and remove items from sheets 1-6 without having to modify the
code.
 
A place to start is with an event macro in the sheet module or in the
Thisworkbook module.
Replace the MsgBox with code or a call to a macro...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 And UCase(Target).Value = "X" Then
MsgBox "What to do with this row"
End If
End Sub

This one allows anything in column B

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 And len(Target) > 0 Then
MsgBox "What to do with this row"
End If
End Sub
 
Thanks Steve. This got me going. But now how can I list the text in column C
A place to start is with an event macro in the sheet module or in the
Thisworkbook module.
Replace the MsgBox with code or a call to a macro...

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 And UCase(Target).Value = "X" Then
MsgBox "What to do with this row"
End If
End Sub

This one allows anything in column B

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 And len(Target) > 0 Then
MsgBox "What to do with this row"
End If
End Sub
 
The code will only fire if there is something in the B column

Now you just need to define where to put the results

lrw finds the row number of last entry in Column A and adds 1

dim lrw
lrw = Sheets("Sheets2").Cells(Rows.COUNT, "A").End(xlUp).Offset(1, 0).Row
change "A" to "C" if you like...

example to paste (really it just puts the value, or text, or ... into Sheet2
on the first open row)

Sheets("Sheet2").Cells(lrw,3).Value = target.offset(0,1).value or
Sheets("Sheet2").Cells(lrw,3).Value = Sheets("Sheet1").Range("C5").Value

you can remove .Value, or replace it with .Text....

let me know if any of this helps..

--
steveB

Remove "AYN" from email to respond
Maggie said:
Thanks Steve. This got me going. But now how can I list the text in column
C
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top