If specific cell value in a column, copy
Closed
freshfoot
Posts
1
Registration date
Friday October 28, 2011
Status
Member
Last seen
October 28, 2011
-
Oct 28, 2011 at 04:59 PM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 1, 2011 at 10:47 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 1, 2011 at 10:47 AM
Related:
- If specific cell value in a column, copy
- How to find specific words on a page - Guide
- If cell contains date then return value ✓ - Excel Forum
- Excel: If Date =, then enter a value ✓ - Excel Forum
- Excel formula to check if cell contains a date - Excel Forum
- If cell A1 has text then cell B2 has today's Date ✓ - Excel Forum
1 response
TrowaD
Posts
2921
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 27, 2022
555
Nov 1, 2011 at 10:47 AM
Nov 1, 2011 at 10:47 AM
Hi Freshfoot,
When the value in column B is found in the list of 80 items then
Copy value in column A, paste to column O.
This is clear to me, but what do you want to do with column P?
I assumed that column O has a header or some value in row 5.
Anyway look at this code, adjust it, run it (make backup or save first):
Post back your findings so we can tweak the code.
Best regards,
Trowa
When the value in column B is found in the list of 80 items then
Copy value in column A, paste to column O.
This is clear to me, but what do you want to do with column P?
I assumed that column O has a header or some value in row 5.
Anyway look at this code, adjust it, run it (make backup or save first):
Sub test() Dim x As Integer For Each cell In Range("B1:B300") 'x = 1 means your list of 80 items starts at row 1 x = 1 Do 'the number 8 stands for the column number of the list with 80 items If cell.Value = Cells(x, 8).Value Then _ cell.Offset(0, -1).Copy Destination:=Range("O" & Rows.Count).End(xlUp).Offset(1, 0) x = x + 1 'x = 81 means that row 81 is the last row of the list with 80 items Loop Until x = 81 Next End Sub
Post back your findings so we can tweak the code.
Best regards,
Trowa