+ Reply to Thread
Results 1 to 2 of 2

Importing

  1. #1
    tblocker
    Guest

    Importing

    When I export a file into Excel using Microsoft Office XP, rows are placed
    between the data exactly the way they should be. Using Excel in the Office
    2003 version, the rows are eliminated. This causes an issue when using a
    macro because the data shifts. Is there a way to make this uniform? At this
    point, I don't care which way it imports as long as it is uniform no matter
    which version is used.

  2. #2
    Nick Hodge
    Guest

    Re: Importing

    How are you exporting this into excel? Or are you importing into Excel?
    There may be a setting if we know what method you are using and what
    resulting table you are getting (Flat, pivot, etc)

    You can adapt the code in the macro to work with the amount of data you
    have, it's just this won't be possible from the code from the macro
    recorder.

    The code below for example will find the last cell in column A and this then
    can be used to size the true 'UsedRange'

    Sub FindLastCell()
    Dim lLastRow As Long
    Dim iLastCol As Integer
    Dim myRng As Range
    lLastRow = Range("A65536").End(xlUp).Row
    iLastCol = Range("IV1").End(xlToLeft).Column
    Set myRng = Range(Cells(1, 1), Cells(lLastRow, iLastCol))
    MsgBox "Data covers: " & myRng.Address, vbOKOnly
    End Sub



    --
    HTH
    Nick Hodge
    Microsoft MVP - Excel
    Southampton, England
    [email protected]HIS


    "tblocker" <[email protected]> wrote in message
    news:[email protected]...
    > When I export a file into Excel using Microsoft Office XP, rows are placed
    > between the data exactly the way they should be. Using Excel in the Office
    > 2003 version, the rows are eliminated. This causes an issue when using a
    > macro because the data shifts. Is there a way to make this uniform? At
    > this
    > point, I don't care which way it imports as long as it is uniform no
    > matter
    > which version is used.




+ 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