Excel compare and transfer data

Closed
NateDawg - Dec 18, 2009 at 04:10 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Dec 18, 2009 at 08:09 PM
Hello,
On one sheet I have column A containing 'stock numbers' with columns B through AA containing information on that stock number. There are roughly 1000 rows in this sheet. I have another sheet with column A containing stock numbers ONLY, and there are only about 200 of them, but they all match stock stock numbers from the first sheet. I need a script that will compare the stock numbers on sheet 2 with sheet 1 and fill out the corrosponding data from columns B through AA to sheet 2. Thanks in advance for any help on this.
Related:

1 response

venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 811
Dec 18, 2009 at 08:09 PM
I presume in sheet 2 row 1 is haing headings and stock numbers are entred from A2 down
in B2 copy this formula

=VLOOKUP($A2,Sheet1!$A$2:$AA$1000,COLUMN(B$1),FALSE)

note dollar sigbs carefully
now copy B2 down and to right up to column AA
I have made provision for 1000 rows , if more change the formula suitably. ($aa$1000)
0