LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Array instead of loop I'm sure

This code works, but it's a seven minute ride.

1858 index numbers listed in column A.

In range C1 to EJ95 I need to find them and move them down 1 row and left 1 column. Each index number appears only once in this range.

Per usual, I struggle making array code work for me.

Thanks,
Howard


Sub ReDoData()
Dim c As Range, spNum As Range
Application.ScreenUpdating = False

With Range("C1:EJ950")
.UnMerge
End With

For Each c In Worksheets("Orginal List").Range("A1:A1858")

Set spNum = Sheets("Orginal List").Range("C1:EJ950") _
.Find(What:=c, _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)

If Not spNum Is Nothing Then

spNum.Cut spNum.Offset(1, -1)

End If

Next

Application.ScreenUpdating = True
End Sub
 
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
loop to add data in array PST Excel Programming 2 August 3rd 07 07:12 PM
Filling an array with a Loop Kevin O'Neill[_2_] Excel Programming 3 January 4th 06 06:40 PM
loop with array John Excel Programming 6 September 16th 05 02:15 PM
Loop through array of worksheets Andibevan[_2_] Excel Programming 4 May 19th 05 11:49 AM
Help with Loop / Array / Ranges Kathy - Lovullo Excel Programming 1 December 14th 04 02:59 PM


All times are GMT +1. The time now is 01:26 AM.

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

About Us

"It's about Microsoft Excel"