Loop

C

Christina

I have this macro which looks for cell in a column that contains text
"VENDOR ID" and then moves one cell down and copies that data along side
data that is in next column that is for that vendor, then moves down the
column to next cell with Text VENDOR ID moves down and repeats the action
until there is no more data. I want the search to be restricted to that
column as the text VENDOR ID appears in other columns in the sheet.

Eg
Vendor Id INVE#
ABC 1
2
3

Vendor Id INVE#
XYZ 1
2
3

I want to create a loop. This is the macro I have. Please add to this
what would be needed to create a loop, as I am new to this.

Cells.Find(What:="Vendor ID", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Select
ActiveCell.Offset(1, 0).Select
Selection.Copy
Range(Selection, Selection.End(xlDown)).Select
ActiveSheet.Paste


THsnks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top