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 Using a macro to import from another spreadsheet


I have a spreadsheet which needs to have some data extracted from it
the data manipulated and then the whole thing exported as a text file.

I have no problem with the second and third part of this but I a
struggling with the first part:

How does one use a macro to import columns from another spreadsheet
The problem is I don't want all of the columns, only some and no
necessarily in the order in which they are in the original sheet
something like this. I will write this in English so that I hope
explain what I want:

Dim startRow as integer
StartRow = 6
For rows = StartRow to 65536

If Column A is empty then finish

Move to First blank row of output sheet

Import Row X, Column A from Input Sheet
Move to Next Column
Import Row X, Column D from Input Sheet
Move to Next Column
Import Row X, Column B from input sheet
(etc....)

Repeat until all rows are done

The problem is I don't know how to import data from one workbook t
another when you don't know how many rows there are

--
zaphod200
-----------------------------------------------------------------------
zaphod2003's Profile: http://www.excelforum.com/member.php...fo&userid=3436
View this thread: http://www.excelforum.com/showthread.php?threadid=54139

 
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
Import from spreadsheet Kjeldc Excel Programming 4 February 7th 10 02:43 AM
Macro to import & update rows in spreadsheet based on Ref ID. Harry Seymour[_2_] Excel Discussion (Misc queries) 0 June 9th 08 04:05 PM
Import an excel spreadsheet in ASP.NET Uma Muthu Excel Programming 0 April 7th 06 09:49 PM
Import from spreadsheet sebastienm Excel Programming 0 March 26th 06 11:44 PM
Import a spreadsheet Spencer Hutton[_3_] Excel Programming 3 December 21st 04 02:28 PM


All times are GMT +1. The time now is 07:15 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"