Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: Angelina20
 | Femeie 19 ani Cluj cauta Barbat 24 - 55 ani |
|
Mrrrr
AdMiN
 Inregistrat: acum 18 ani
Postari: 2251
|
|
Whenever someone would enter a value via drop down list in range C7:C25 (drop down list location in Sheet2), range D7:D25 would automatically be populated with the corresponding data coming from Sheet2.
This should be added in Sheet1 code:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count = 1 Then Application.EnableEvents = False If Not Intersect(Target, Range("$C$7:$C$25")) Is Nothing Then If Target = "" Then Target.Offset(, 1) = "" Else Target.Offset(, 1) = Application.Index(Sheet2.Range("B:B"), Application.Match(Target, Sheet2.Range("A:A"), 0)) End If ElseIf Not Intersect(Target, Range("$D$7:$D$25")) Is Nothing Then If Target = "" Then Target.Offset(, -1) = "" Else Target.Offset(, -1) = Application.Index(Sheet2.Range("A:A"), Application.Match(Target, Sheet2.Range("B:B"), 0)) End If End If Application.EnableEvents = True End If End Sub |
Source:
_______________________________________

|
|
pus acum 5 ani |
|