Nabarun Chakraborti
Nabarun Chakraborti

Reputation: 239

Compare String with Excel sheetname and pull values from respective sheets

I've an excel file which contains more than 300 different sheets. I want to pull certain values from different sheets by comparing the name of the individual sheets with a defined list of names.

For simplicity below is a sample excel. Sheet1 contains the name of the other sheets and the values should be having the values from respective sheets

enter image description here

This is how Values are appearing in diffrent sheets:

enter image description here

The final data will look like -

enter image description here

It will be really helpful to get a solution for this.

Upvotes: 0

Views: 42

Answers (1)

norie
norie

Reputation: 9857

Assuming the value you want from each sheet are in the cell B3 you can use the INDIRECT worksheet function.

Put this formula in B2 on Sheet1 and copy it down.

=INDIRECT("'" & A2 & "'!B3")

Upvotes: 2

Related Questions