VBA how to look up the specific name of a worksheet and assign data to it

1

Personal I have a list in the plan ("Registration"). range ("H2: H10")

I have Data in plan ("Treated"). range ("A2": "Q1862")

I want to search for the name in the plan list ("Register"). range ("H2: H10"), in the plan ("Treaty"). line where this name was found, was copied to the spreadsheet whose name I have already created that is the same as the searched name, and when the name is equal it populates and when it is different, it looks for the spreadsheet of the same name and populates it tbm so on .

I know the basic concepts of search, but I do not know how to look for specific spreadsheet names that will match the name stored in a variable.

Thanks for the help.

    
asked by anonymous 30.03.2017 / 21:50

1 answer

2

If both spreadsheets are open you can use a

Workbooks("Nome da planilha.xlsx").Worksheets("Nome da Planilha").Cells(x,y)

To search within the other, of course, you will have to use other structures, but this line you check.

    
06.04.2017 / 18:09