Answer the question
In order to leave comments, you need to log in
How to access list item?
Good afternoon. I am making a Name
list
with the values Vasya; Petya; Masha
This list is located in cell A1
How can I access Masha? Or Petya ...
Like A1: 1 or something like that ....
For fans of "Why do you need it?" - I want to make a condition, like If A1: 1, then I take information from another list, etc.
Answer the question
In order to leave comments, you need to log in
Open the "Developer" tab (if not, then enable it) -> Visual Basic -> on the left find any sheet you know from the book, right click -> insert-> module
Double click on the new module, insert this function into it. Now it can be used in formulas and macros
Public Function GetListElement(CellText As String, num As Long) As String
Elements = Split(CellText, ";")
GetListElement = Elements(num - 1)
End Function
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question