Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ok, here is the code I currently have. I got some from on here, and
some,(the really slow part) is my first attempt at VBA. The changes I need to make are as follows. The workbook contains sheets called 1, 2, 3, 4, 5, etc, all the way to 31. (seperate sheet for each day of the month). I need this formula to work on the active sheet, no matter which sheet it is on. The second problem is the speed of the DO UNTIL loop. The 400 is there because I know that none of teh data that is copied into the A column goes beyond 400 rows. Any help would eb greatly appreciated Sub test() Call RemoveDuplicates("=") Call tr End Sub Public Sub RemoveDuplicates(ByVal ReplaceCharacter As String) Dim wks As Worksheet Dim rngToSearch As Range Dim rngFound As Range Set wks = Sheets("1") Set rngToSearch = wks.Range("a:a") Set rngFound = rngToSearch.Find(What:=ReplaceCharacter & _ ReplaceCharacter, LookAt:=xlPart) Do While Not rngFound Is Nothing rngToSearch.Replace What:=ReplaceCharacter, _ Replacement:="" Set rngFound = rngToSearch.Find(What:=ReplaceCharacter & _ ReplaceCharacter, LookAt:=xlPart) Loop End Sub Sub tr() Dim i As Integer i = 0 Do Until i = 400 i = i + 1 If Cells(i, 1) = "" Then Cells(i, 1).Delete Cells(i, 2).Value = Application.Trim(Cells(i, 1)) Loop End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanls, but this created even more problems and didn't run any faster.
Now all teh formulas are showing ref# |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can this be done faster? | Excel Discussion (Misc queries) | |||
Faster way to do this? | Excel Programming | |||
Can faster CPU+larger/faster RAM significantly speed up recalulati | Excel Discussion (Misc queries) | |||
Is there a faster way | Excel Programming | |||
Which one is faster? | Excel Programming |