S
S
S_Morello2019-04-18 08:43:35
Visual Basic
S_Morello, 2019-04-18 08:43:35

How to make a drop down list of sheets followed by autocomplete from the selected sheet?

Good day!
There is a book, it contains n sheets with specifications.
There is a label on the first page. In the cells of one column, you need to make a drop-down list of sheets ("sections") of this book. When you select "section" in the next column, a drop-down list appears from the cells of a specific column of the table from this sheet ("name"). When "name" is selected, the adjacent cell of the next column ("price") is automatically filled in with the value from the table from the sheet of the selected section.
table example
Thanks for the help!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
shushpanio, 2019-04-18
@shushpanio

Not quite automated, but the list of sheets can be obtained like this:
Start a macro function:

Function SheetName(SheetNumber As Integer) As String
SheetName = Worksheets(SheetNumber).Name
End Function

Further, if in any cell you write =SheetName(Sheet serial number) (you can refer to the cell), then the name of the desired sheet will be returned to the cell (the numbering follows the logic - the leftmost sheet of the document = 1
For the list of fields, you need to use named ranges with an offset ( example here )
Well, then VLOOKUP in combination with INDIRECT

S
S_Morello, 2019-04-22
@S_Morello

I solved the issue through vpr .. a lot of vpr ... But for me the main thing is that it would work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question