Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 12-19-2017, 01:20 PM
NoSparks NoSparks is offline Looking to copy select cells in table using dropdown list to paste to new table in another worksheet Windows 7 64bit Looking to copy select cells in table using dropdown list to paste to new table in another worksheet Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Quote:
My research so far has led me to believe that I would need to put this code in each of the 24 worksheets.
Sounds like you could use the Workbook_SheetChange event in the ThisWorkbook module.
Attaching a sample workbook to work with would be advantages.
Without knowing how your 24 sheets are associated with the correct table on the main worksheet can't elaborate much,
would think you could use something along the lines of this...

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    'don't apply to Main sheet
    If Sh.Name = "Main" Then Exit Sub
    'limit to single cell in column K
    If Target.Count > 1 Or Target.Column <> 11 Then Exit Sub

    Dim ray As Variant
    Dim oLo As ListObject, nxtRow As ListRow

If UCase(Target.Value) = "NO" Then
    ray = Split(Cells(Target.Row, "B").Value & "|" & Cells(Target.Row, "D").Value & "|" & Cells(Target.Row, "J").Value, "|")
    With Sheets("Main")
        Set oLo = .ListObjects("?")  'don't know how you associate table to sheet
        Application.EnableEvents = False
        Set nxtRow = oLo.ListRows.Add
        nxtRow.Range.Cells(1, 2).Resize(, 3).Value = ray
        Application.EnableEvents = True
    End With
End If

End Sub
Here's a couple of links to sites dealing with tables
https://www.thespreadsheetguru.com/b...t-excel-tables
http://www.jkp-ads.com/Articles/Exce...lComments=True
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking to copy select cells in table using dropdown list to paste to new table in another worksheet How to paste the data from one table into the cells of another table, without overwriting anything CClio333 Word Tables 1 08-12-2014 05:17 PM
Looking to copy select cells in table using dropdown list to paste to new table in another worksheet Is it possible to copy non-contiguous rows of a Table and paste them as a separate Table in Word? Joey Cheung Word Tables 1 08-12-2014 05:15 PM
Can you copy & paste cells across worksheets and preserve reference to worksheet? New Daddy Excel 2 11-27-2013 07:19 AM
Copy and paste table Patrickjm Word 1 03-19-2013 03:30 PM
Populate dropdown list with data from Access table spw4000 Office 0 02-24-2012 05:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft