Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Counter in macro
I set a loop which is supposed to go over all the list in file Switch
Accounts. There is a list of 10 different companies and retrieve the data from the same customer from file ord-dump. The macro below is not going over the file swith account but over the ord-dump. I can't figure out the error. Could anyone help me pls. 'open file with list Workbooks.Open Filename:="H:\Switch Accounts.xls" RangeCount = 2 BillAccount = Range("a" & RangeCount) 'activate file with data Windows("ord-dump.csv").Activate Sheets.Select Do Until ActiveCell.Offset(2, 0) = "" 'Find cell Cells.Find(What:=(BillAccount), After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate Selection.CurrentRegion.Select Selection.Copy Sheets.Add Range("A2").Select ActiveSheet.Paste RangeCount = RangeCount + 1 Loop Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for a "counter" | Excel Discussion (Misc queries) | |||
Day counter | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
counter | Excel Discussion (Misc queries) | |||
Counter | Excel Discussion (Misc queries) |