Need to copy rows based on values entered
Closed
JCW
-
Mar 21, 2012 at 10:21 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Mar 22, 2012 at 11:26 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Mar 22, 2012 at 11:26 AM
Hello,
I need help with a formula or macro. My situation is this: I have one sheet of data (Sheet1) with unique values (item numbers) in Column A. In Sheet2 I'd like to be able to enter item numbers down Column A and run a formula/script that will then find that row in Sheet1 and copy it to Sheet2 (into the same row that the item number was entered into in Sheet2).
Both sheets will contain column headings in Row 1 and be formatted the same.
Any help would be greatly appreciated.
I need help with a formula or macro. My situation is this: I have one sheet of data (Sheet1) with unique values (item numbers) in Column A. In Sheet2 I'd like to be able to enter item numbers down Column A and run a formula/script that will then find that row in Sheet1 and copy it to Sheet2 (into the same row that the item number was entered into in Sheet2).
Both sheets will contain column headings in Row 1 and be formatted the same.
Any help would be greatly appreciated.
Related:
- Need to copy rows based on values entered
- How to enter @ on laptop - Guide
- We couldn't find an account matching the login info you entered, but found an account that closely matches based on your login history. - Facebook Forum
- Based on the values in cells b77 ✓ - Excel Forum
- Return Seq Values Until Blank value then return different set of seq values ✓ - Excel Forum
- Matching Names to Id Numbers - Excel Forum
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Mar 22, 2012 at 11:26 AM
Mar 22, 2012 at 11:26 AM
Hi JCW,
Take a look at the following formula in B2 of sheet2:
=VLOOKUP($A$2;Blad1!A2:C8;2;0)
It will find the value entered in sheet2 A2 in the range A2:C8.
When found it will return the value in column 2 of the range.
The final 0 in the formula makes sure that the values are matching.
A2 in the formula is an absolute cell reference, meaning that when you drag the formula the reference remains the same.
Now drag the formula to the right and as far as needed and for each following column change the 2 into a 3 then a 4 and so on....
Now that you understand the formula, you can adjust it to make it work correctly for you.
Good luck and best regards,
Trowa
Take a look at the following formula in B2 of sheet2:
=VLOOKUP($A$2;Blad1!A2:C8;2;0)
It will find the value entered in sheet2 A2 in the range A2:C8.
When found it will return the value in column 2 of the range.
The final 0 in the formula makes sure that the values are matching.
A2 in the formula is an absolute cell reference, meaning that when you drag the formula the reference remains the same.
Now drag the formula to the right and as far as needed and for each following column change the 2 into a 3 then a 4 and so on....
Now that you understand the formula, you can adjust it to make it work correctly for you.
Good luck and best regards,
Trowa