#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 132
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for a "counter" Lineman116 Excel Discussion (Misc queries) 2 March 11th 09 07:37 PM
Day counter poohgld Excel Discussion (Misc queries) 2 October 2nd 08 10:45 AM
using a cell value to control a counter inside a macro and displaying macro value ocset Excel Worksheet Functions 1 September 10th 06 05:32 AM
counter Haza Excel Discussion (Misc queries) 2 January 20th 06 08:30 PM
Counter Sdbenn90 Excel Discussion (Misc queries) 4 January 9th 06 11:43 AM


All times are GMT +1. The time now is 04:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"