# Copy row data based on a reference to a cell in that row

#### mikey66

##### New Member
I have a normal table of data A1 through M50.
Row 1 contains column headings for the data.
Column A contains report names.

I want the user to enter a report name someplace (a particular cell or a data request menu) and have the related data (say A15:M15 sheet1) copied to cells A1:M1 on another sheet (sheet2) in the same workbook.

For example, by entering "Report C" in a given cell, I want the report c data (i.e., Report C, 56, 127, 20, 44, 8) to be placed in A1:M1 of sheet2.

Name Area Vol Code Section Pg
Report A 54 125 18 42 6
Report B 55 126 19 43 7
Report C 56 127 20 44 8
Report D 57 128 21 45 9
Report E 58 129 22 46 10
Report F 59 130 23 47 11
Report G 60 131 24 48 12

Is there a relatively simple way to do this?

Thanx

### 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.

#### ravishankar

##### Well-known Member
Hi
In Cell A1 of sheet2 enter the search report no.
B1 = vlookup(a1,sheet1!A1:M50,2,false)
C1= vlookup(a1,sheet1!A1:M50,3,false)
continue till M1 and change third parameter 2, 3, 4, 5, 6, .... till 13

ravi

#### ravishankar

##### Well-known Member
Hi
In Cell A1 of sheet2 enter the search report no.
B1 = vlookup(a1,sheet1!A1:M50,2,false)
C1= vlookup(a1,sheet1!A1:M50,3,false)
continue till M1 and change third parameter 2, 3, 4, 5, 6, .... till 13

ravi

#### jindon

##### MrExcel MVP
Entering Report Name in Shee2!A1

Sheet2!A15:
=If(CountIf(Sheet1\$A1:\$A15,\$A1)>0,VlookUp(\$A15,Sheet1!\$A1:\$M50,Column(),False),If(Column()=1,"No Matched data",""))

then copy to M15

Note: edited formula

Replies
1
Views
446
Replies
1
Views
1K
Replies
3
Views
190
Replies
8
Views
829
Replies
7
Views
237

1,190,912
Messages
5,983,529
Members
439,848
Latest member
timmyo

### 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