W
woodcock
I am looking for some VB macro help. I have two worksheets in a
spreadsheet. On the first worksheet, in column A, starting on row 2, I
have an ID number (1655), on the next row the next ID number, so on and
so on.
Something like this:
1655
1634
1623
1676
1742
on and on ...
I would like a macro to use the first value in the column A2(1655), and
search for that value in the second worksheet and copy the data two
cells over to the right..
Example:
1655 10.1.1.2 /30 00:15:2g:94:bc:0f yes
1623 10.1.1.32 /30 00:15:2g:45:we:0t no
1745 10.1.1.23 /30 00:15:2e:3w:e3:07 yes
in the example there are 5 columns(A-E), Using the value from the first
sheet, 1655, I want the macro to search the worksheet for that value,
when it finds the row, copy the data two columns over, (column D) and
paste that data into another worksheet.
So in this example it would search the second worksheet for the value
1655, when the row was found it would copy the data in in column D
(00:15:2g:94:bc:0f ) and paste it in another worksheet.
Then I would like the search to start over and use the value from the
next row on the first worksheet A3(1634). And then move on to the next
value A4, so on and so on, until there is nothing left in column A on
the first sheet.
Thanks for any help on this..
Michael.
spreadsheet. On the first worksheet, in column A, starting on row 2, I
have an ID number (1655), on the next row the next ID number, so on and
so on.
Something like this:
1655
1634
1623
1676
1742
on and on ...
I would like a macro to use the first value in the column A2(1655), and
search for that value in the second worksheet and copy the data two
cells over to the right..
Example:
1655 10.1.1.2 /30 00:15:2g:94:bc:0f yes
1623 10.1.1.32 /30 00:15:2g:45:we:0t no
1745 10.1.1.23 /30 00:15:2e:3w:e3:07 yes
in the example there are 5 columns(A-E), Using the value from the first
sheet, 1655, I want the macro to search the worksheet for that value,
when it finds the row, copy the data two columns over, (column D) and
paste that data into another worksheet.
So in this example it would search the second worksheet for the value
1655, when the row was found it would copy the data in in column D
(00:15:2g:94:bc:0f ) and paste it in another worksheet.
Then I would like the search to start over and use the value from the
next row on the first worksheet A3(1634). And then move on to the next
value A4, so on and so on, until there is nothing left in column A on
the first sheet.
Thanks for any help on this..
Michael.