# Grabbing Data Macro

#### audiorij

##### New Member
Ok where I work we have a certain part hat is named such as (ABCD1234), that part gets multiple tests done. Each test generates an excel worksheet with that part number and a list parameters and subsequent results. These sheets for sake of argument are called (sheet1), (sheet2), (sheet3).

I want to make a master sheet called (Master) that has a list of all the parameters of all tests. Then empty boxes next to all of them. At the top I want a user to put in the part number into a cell, then have a button to click that runs a macro that will find the part number on all of the other sheets and input the data into the master sheet. When the macro looks for the part number in these other sheets, it will have to grab data from them based on the location of the cell that holds the part number if that makes sense. It has to find the location cell of the part number, then grab data in the cell say 2 colums to the right. And then place it where I want it on the master sheet.

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

#### KWMSeattle

##### Board Regular
Are you familiar with using VLOOKUPs? If I am understanding correctly, you don't need to write a macro for your needs.

#### ravishankar

##### Well-known Member
Hi
Master sheet A1= ABCD1234
B1 = vlookup(A1,Sheet2!A1:D50,4,false)
will return the test value in col D of sheet 2 matching ABCD1234 in col A of the same sheet
Ravi

Replies
12
Views
269
Replies
1
Views
272
Replies
1
Views
314
Replies
2
Views
238
Replies
5
Views
412

1,190,781
Messages
5,982,873
Members
439,803
Latest member
sushilneupane

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back