Hi everyone, I'd like to make a list at column D of the example image I've attached. Let's say for example D39. As you can see, some cells in the same row on the right side have values whilst others have empty outcome. I'd like it to make a list that, whenever there is a value, it creates a list with the top text, so for example D39, the list should say "Aproximación" and "PAPI". The range of the list goes from column E to BA and there are like 10 thousand rows, so its quite a lot of data.
In case it's possible, it would be great if the list could give only values which are greater than 0, smaller than 0 BUT greater than a given value on a cell (B2 for example) or no list in case the whole row is empty. I guess it's not very easy and hope I explained myself clearly, thanks!
Jindon was kind enough to try to help me but for some reason it doesnt seem to work for me, the code is the following,
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Range, x, flg As Boolean
If Intersect(Target, Columns("e:ba")) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Not [isref(mylist!a1)] Then
With Sheets.Add
.Name = "MyList": .Visible = 2
End With
End If
For Each r In Intersect(Target, Columns("e:ba"))
If r.Row > 6 Then
With r.EntireRow.Range("d1").Validation
.Delete: flg = False
x = Filter(Evaluate("if(e" & r.Row & ":ba" & r.Row & "<>"""",e6:ba6)"), False, 0)
If UBound(x) > -1 Then
With Sheets("mylist").Rows(r.Row)
.Clear
With .Cells(r.Row, 1).Resize(, UBound(x) + 1)
.Value = x
.Name = "mylist_" & r.Row: flg = True
End With
End With
End If
If flg Then .Add Type:=3, Operator:=xlEqual, Formula1:="=mylist_" & r.Row
End With
End If
Next
Application.EnableEvents = True
End Sub
https://www.excelforum.com/excel-pro...nk-or-not.html
Bookmarks