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: 1
Default Update Code to work between 2 files


How do I update the following code and any code to work between 2 files
I will run the program from the original document (called "Rundw"
within sheet1. I need to move sheets 11 - 14 to another file calle
"Run_database"
"For i = 11 To 14
Set rng = Sheets("Sheet " & i).Range(rngArray(i - 11))"

Sub test2()
Dim r As Range, c As Range, rngArray, Data As Range, rng As Range
Dim i As Integer, ii As Integer
Set Data = Sheets("sheet1").Range("ck133:dt144")
rngArray = Array("D5:IT7", "D5:IT28", "D5:IT144", "D5:IT645")
For i = 11 To 14
Set rng = Sheets("Sheet " & i).Range(rngArray(i - 11))
For ii = 1 To rng.Columns.Count Step 2
For Each r In rng.Columns(i)
Set c = Data.Find(what:=r.Value, looat:=xlWhole)
If Not c Is Nothing Then r.Offset(, 1) = r.Offset(, 1
+ 1
Next
Next
Next
End Su

--
dkenebr

-----------------------------------------------------------------------
dkenebre's Profile: http://www.excelforum.com/member.php...info&userid=76
View this thread: http://www.excelforum.com/showthread.php?threadid=39503

 
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 to update a column in a work based on another work sheet WickerMan New Users to Excel 1 December 4th 09 12:58 PM
Can't get update to work Neil[_4_] Setting up and Configuration of Excel 7 January 31st 09 10:40 PM
How do I save/update work to appear in 2 seperate files? Dodeka1 Excel Discussion (Misc queries) 2 December 14th 07 12:18 PM
DO NOT update links doesn't work for me. Hal Excel Discussion (Misc queries) 8 April 18th 06 12:15 AM
2 files, mass update comments between files Katycatchesnut Excel Worksheet Functions 0 June 2nd 05 10:16 PM


All times are GMT +1. The time now is 04:39 PM.

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"