Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default range and variant

From 5 different fies i have to fill a sheets("Base") where i have
Cod, Descripton, Amount

I do this
For iFile = 1 to 5
workbook.open "Agent" & trim(str(iFile))
set rng = Range("a10:u500") 'the range i need
arrAgents = rng.value

Call FillSheetBase

next


Now i need to fill form the variant array the sheets base
And i use this code in the sub FillSheetBase


for i = 1 to uBound(arrAgents,1)
Set c = Columns("A").cells.find(arrAgents(i,1))
if not c is nothing then
c.activate
c.offset(0,1) = arrAgents(i,5)
c.offset(0,2) = arrAgents(i,11)
endif
next

Any better idea?


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
for each in range gives variant array mcgurkle Excel Programming 2 November 7th 07 03:17 PM
Disconnected Range to Variant INTP56 Excel Programming 4 July 21st 07 07:00 AM
How do I assign range to variant and use Mike H[_2_] Excel Discussion (Misc queries) 7 June 7th 07 01:40 AM
Assigning range to variant vezerid Excel Programming 2 March 12th 07 04:46 PM
Assigning range to variant vezerid Excel Programming 2 March 12th 07 04:45 PM


All times are GMT +1. The time now is 12:18 PM.

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"