VBA how to find the specific name of a spreadsheet and impute data in it

Asked

Viewed 620 times

1

Staff I have a list in plan("Register"). range("H2:H10")

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

I want to search the name in the list of plan("Register"). range("H2:H10"), in plan("Treaty"). range("A2"). value and when you find, I would like the entire line where that name was found to be copied into the spreadsheet whose name I already created that is equal to the name sought, and when the name is equal it goes populating and when it is different, looks for the spreadsheet of the same name and popula it tbm so on.

I know the basic concept of searching, but I don’t know how to search for specific sheet names which will equal the name stored in a variable.

Thanks for the help.

1 answer

2

If both worksheets are open you can use one

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

to look inside the other, of course, you’ll have to use other structures, but this line you check.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.