+ Reply to Thread
Results 1 to 5 of 5

How to divide an excel sheet vertically into 4 parts?

  1. #1
    Forum Contributor
    Join Date
    04-09-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    117

    How to divide an excel sheet vertically into 4 parts?

    Dear All, thanks for reading the question.

    I have many excel sheets with 1000 columns and 100,000 rows. I have to import these sheets into SAS system which wont let me import more than 250 columns per sheet (it misses the remaining columns, though rows it can import all of them). So, one solution is break each such sheets into 4 individual sheets. Ofcourse I can manually take the cursor to 250th column and copy/paste that data into another sheet and so on. But this is cumbersome and also means there is chance of mistake.
    Is there a way I can divide the sheets into 4 sheets separately with each sheet having equal number of columns?

    Another thing I need to do is that on the top row there are company codes -most of them start with a letter which is fine. There are few which start with a number and I have to add a dummy letter x before the number. Now since there are 1000 columns, I have to scan the top row of all 1000 columns to find number codes which are scattered unevenly. So I was wondering if there is a way to tell excel to change all such number codes with extra x behind each number?

    Million thanks for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: How to divide an excel sheet vertically into 4 parts?

    You could use the OFFSET function, although with so many data points it might grind to a halt! If the raw data's on Sheet1, then in Sheet2 cell A1,
    =OFFSET(Sheet1!$A$1,ROW()-1,COLUMN()-1) for dataset 1
    Sheet3 cell A1
    =OFFSET(Sheet1!$A$1,ROW()-1,COLUMN()-1+250) for dataset 2, etc
    You'd still have to copy the formula into the right columns.
    Despite my being averse to macros on grounds of auditability, maintenance, etc, this might be one time when a macro serves you well. You'll need advice from others on that, as I stay away from them as much as I can!

    As for automatically avoiding the numbers, you can use =IF(ISNUMBER(A1),"x"&A1,A1) in row 2 to insert the x before any numbers.
    Kind Regards,

    Out of the Hat

    "Computers are stupid - they do EXACTLY what you tell them to"

    If I've helped you with a problem, please say thanks by clicking the small star icon on the left.

  3. #3
    Forum Contributor
    Join Date
    04-09-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    117

    Re: How to divide an excel sheet vertically into 4 parts?

    Thanks so much. I will try first without macros using offset function and will see.
    Regards

  4. #4
    Forum Contributor
    Join Date
    04-09-2012
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2007
    Posts
    117

    Re: How to divide an excel sheet vertically into 4 parts?

    Hi, I tried it with the offset function, but it only gave me one value (date) in sheet 11 -My data is in sheet 10 and I used sheet10 in the formulae.
    Can someone help me with this? Thanks a lot.

  5. #5
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: How to divide an excel sheet vertically into 4 parts?

    Attach an example of your problem and I'll take a look.

+ 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