+ Reply to Thread
Results 1 to 2 of 2

Extracting Data from a worksheet into another excel file

  1. #1
    Registered User
    Join Date
    01-13-2009
    Location
    los angeles
    MS-Off Ver
    Excel 2007
    Posts
    6

    Extracting Data from a worksheet into another excel file

    Hi,

    I have an excel file with 432 worksheets. I need the info from columns C F & I to be put into column A of a new excel file. So all info from columns C F & I will go into column 1 in a new excel document. Is there a way to extract the info from columns C, F and I from all 432 worksheets and put into the new excel file? So far, I have been copying and pasting. I just now realized that there are 432 sheets and I am only on sheet 32. *big sigh*

    Thank you so much for your help.

  2. #2
    Forum Contributor
    Join Date
    10-11-2007
    Location
    Sweden
    MS-Off Ver
    365
    Posts
    251
    Hi!

    Try this macro:

    Public Function AllSheetNames()
    Dim Arr() As String
    Dim I as Integer
    Redim Arr(Sheets.Count-1)
    For I = 0 To Sheets.Count - 1
    Arr(i) = Sheets(I+1).Name
    Next I
    AllSheetNames = Arr ' return a row array OR
    AllSheetNames = Application.Worksheetfunction.Transpose(Arr)
    ' return a column array
    End Function
    I found it here

    The macro returns an array of all your sheetnames. You can use that array to get the info from columns C F & I of all your sheets.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1