![]() |
If cell is checked, then list ondifferent worksheet
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. -- Thank you, Maggie |
If cell is checked, then list ondifferent worksheet
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 -- steveB Remove "AYN" from email to respond "Maggie" wrote in message ... 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. -- Thank you, Maggie |
If cell is checked, then list ondifferent worksheet
Thanks Steve. This got me going. But now how can I list the text in column C
on the Summary sheet without displaying blank rows for those whose box was not checked? "STEVE BELL" wrote: 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 -- steveB Remove "AYN" from email to respond "Maggie" wrote in message ... 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. -- Thank you, Maggie |
If cell is checked, then list ondifferent worksheet
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" wrote in message ... Thanks Steve. This got me going. But now how can I list the text in column C on the Summary sheet without displaying blank rows for those whose box was not checked? "STEVE BELL" wrote: 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 -- steveB Remove "AYN" from email to respond "Maggie" wrote in message ... 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. -- Thank you, Maggie |
All times are GMT +1. The time now is 11:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com