Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7667123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:01:08+00:00 2026-05-31T15:01:08+00:00

I have an excel sheet which has some huge data. Data is organized as

  • 0

I have an excel sheet which has some huge data. Data is organized as follows,
A set of 7 columns and n rows; as in a table, and 1000s of such tables are placed horizontally with an empty column to separate. A screenshot is below..

enter image description here …

I just want to have data of every ‘table’ saved into a different file. Manually it would take ever! So, Is there a macro or something I would automate this task with.
I am not well versed with writing macros or any VBA stuff.

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:01:10+00:00Added an answer on May 31, 2026 at 3:01 pm

    Tony has a valid point when he says

    If the table starting at C1 finishes on row 21, does the next table start at C23? If the table starting at K1 finishes on row 15, does the next table start at K17 or K23?

    So here is a code which will work in any condition i.e data is set horizontally or vertically.

    DATA SNAPSHOT

    enter image description here

    CODE

    '~~> Change this to the relevant Output folder
    Const FilePath As String = "C:\Temp\"
    
    Dim FileNumb As Long
    
    Sub Sample()
        Dim Rng As Range
        Dim AddrToCopy() As String
        Dim i As Long
    
        On Error GoTo Whoa
    
        Application.ScreenUpdating = False
    
        Set Rng = ActiveSheet.Cells.SpecialCells(xlCellTypeConstants, xlTextValues)
    
        If Not Rng Is Nothing Then
            AddrToCopy = Split(Rng.Address, ",")
    
            FileNumb = 1
    
            For i = LBound(AddrToCopy) To UBound(AddrToCopy)
                ExportToSheet (AddrToCopy(i))
            Next i
        End If
    
        MsgBox "Export Done Successfully"
    
    LetsContinue:
        Application.ScreenUpdating = True
        Exit Sub
    Whoa:
        MsgBox Err.Description
        Resume LetsContinue
    End Sub
    
    Sub ExportToSheet(rngAddr As String)
        Range(rngAddr).Copy
    
        Workbooks.Add
        ActiveSheet.Paste
    
        ActiveWorkbook.SaveAs Filename:= _
        FilePath & "Output" & FileNumb & ".csv" _
        , FileFormat:=xlCSV, CreateBackup:=False
    
        Application.DisplayAlerts = False
        ActiveWorkbook.Close
        Application.DisplayAlerts = True
    
        FileNumb = FileNumb + 1
    End Sub
    

    NOTE: The above code will work for cells with only Text Values. For cells with only Numeric Values you have to use

    Set Rng = ActiveSheet.Cells.SpecialCells(xlCellTypeConstants, xlNumbers)
    

    And for AlphaNumeric Values (As in your question above), use this

    Set Rng = ActiveSheet.Cells.SpecialCells(xlCellTypeConstants)
    

    HTH

    Sid

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a couple of columns of data in an excel sheet which I
I have an excel sheet which has about 150,000 records, operations like find replace,
I have a few hundred Excel files, where each file has some data on
I have excel sheet with data which I want to get Levenshtein Distance between
I have an excel sheet where in the data looks similar to the table
I have few columns in an excel sheet for which I need to do
I am preparing an Excel sheet in which I have to maintain the version
I have a Excel sheet with two columns and I need to create new
I have a huge ASPX web form which has around 100 fields which need
We use an Excel sheet which contains some business logic (and so it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.