Jun 02 2019 04:47 AM
Hello,
I am quite new to Excel.
I am currently in the progress of making an encounter list with the help of Excel.
What I want to do is the following:
Sheet 1 (named Encounter) has a table named "main_encounter" which contains rows containin the stats of these encounters.
Sheet 2 has a table named "stat_list" which contains stats for some of the encounters in this D&D homebrew version
"main_encounter" tabl, A2, has a list containing all the encounters, and I want, depending on what is picked, to show the corresponding stats that "stat_list" have for the various creatures.
Can this be done?
If you want to have a look at it I have attached the file here as well.
Thank you for taking your time with my humble request for aid.
Jun 02 2019 05:15 AM - edited Jun 02 2019 05:36 AM
Solutionhi, try this event behind Tabelle1, see attached file
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngFind As Range
If Target.Address(False, False) = "A2" Then
Set rngFind = Tabelle2.Range("C:C").Find(what:=Target.Value, lookat:=xlWhole)
With Tabelle2
If Not rngFind Is Nothing Then
.Range(.Cells(rngFind.Row, "D"), .Cells(rngFind.Row, "J")).Copy Destination:=Cells(Target.Row, "B")
End If
End With
End If
End Sub
Best regards from germany
Bernd
www.vba-tanker.com - a database full of excel-macros
Jun 02 2019 05:59 AM
Jun 02 2019 05:15 AM - edited Jun 02 2019 05:36 AM
Solutionhi, try this event behind Tabelle1, see attached file
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rngFind As Range
If Target.Address(False, False) = "A2" Then
Set rngFind = Tabelle2.Range("C:C").Find(what:=Target.Value, lookat:=xlWhole)
With Tabelle2
If Not rngFind Is Nothing Then
.Range(.Cells(rngFind.Row, "D"), .Cells(rngFind.Row, "J")).Copy Destination:=Cells(Target.Row, "B")
End If
End With
End If
End Sub
Best regards from germany
Bernd
www.vba-tanker.com - a database full of excel-macros