If specific cell value in a column, copy
Closed
freshfoot
Posts
1
Registration date
Friday 28 October 2011
Status
Member
Last seen
28 October 2011
-
28 Oct 2011 à 16:59
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 1 Nov 2011 à 10:47
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 1 Nov 2011 à 10:47
Related:
- If specific cell value in a column, copy
- How do i find a specific video on youtube - Guide
- How to delete a column in word - Guide
- Excel column number - Guide
- Excel add 1 if cell contains text ✓ - Excel Forum
- How to search for a specific word on a webpage - Guide
1 response
TrowaD
Posts
2921
Registration date
Sunday 12 September 2010
Status
Contributor
Last seen
27 December 2022
555
1 Nov 2011 à 10:47
1 Nov 2011 à 10:47
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