Results 1 to 6 of 6

Macro works in 2010&2013 but not Excel 2003

Threaded View

  1. #1
    Registered User
    Join Date
    02-01-2013
    Location
    Sverige
    MS-Off Ver
    Excel 2003
    Posts
    13

    Arrow Macro works in 2010&2013 but not Excel 2003

    This macro works for Excel 2010 and 2013, but not
    Excel 2003. When I run it in Excel 2003 all the cells
    (up to row 456) gets filled with #NAMN?
    I'm trying to import data from the file called laget.xls
    to idrott.xls where the macro resides. I'm using the
    Swedish version of Excel 2003 so I guess NAMN
    means NAME in English.


    Sub button_import()
    '
    ' button_import Macro
    ' imports data from laget.xls
    '
    ' Keyboard Shortcut: Ctrl+Shift+I
    '
    
        Range("P2").Select
        Selection.End(xlToLeft).Select
        Range("A2:T506").Select
        Selection.ClearContents
        Range("A2").Select
    
        ActiveWindow.ScrollColumn = 6
        ActiveWindow.ScrollColumn = 5
        ActiveWindow.ScrollColumn = 4
        ActiveWindow.ScrollColumn = 1
        Range("A2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(LEFT('[laget.xls]Sida 1'!RC,FIND("" "",'[laget.xls]Sida 1'!RC,1)),"""")"
        Range("C2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(MID('[laget.xls]Sida 1'!RC[-2],FIND("" "",'[laget.xls]Sida 1'!RC[-2],1),(LEN('[laget.xls]Sida 1'!RC[-2])-FIND("" "",'[laget.xls]Sida 1'!RC[-2],1))+1),"""")"
        Range("D2").Select
        ActiveCell.FormulaR1C1 = _
            "=IF(RC[-3]="""","""",IF(MOD(MID('[laget.xls]Sida 1'!RC[-1],LEN('[laget.xls]Sida 1'!RC[-1])-1,1),2)=0,""Kvinna"",""Man""))"
        Range("F2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(IF('[laget.xls]Sida 1'!RC[-3]=0,"""",'[laget.xls]Sida 1'!RC[-3]),"""")"
        Range("H2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(IF('[laget.xls]Sida 1'!RC=0,"""",'[laget.xls]Sida 1'!RC),"""")"
        Range("I2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(IF('[laget.xls]Sida 1'!RC=0,"""",'[laget.xls]Sida 1'!RC),"""")"
        Range("J2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(IF('[laget.xls]Sida 1'!RC=0,"""",'[laget.xls]Sida 1'!RC),"""")"
        Range("K2").Select
        ActiveCell.FormulaR1C1 = "=IF(RC[-10]="""","""",""Sverige"")"
        Range("L2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(IF('[laget.xls]Sida 1'!RC[-7]=0,"""",'[laget.xls]Sida 1'!RC[-7]),"""")"
        Range("M2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(IF('[laget.xls]Sida 1'!RC[-7]=0,"""",'[laget.xls]Sida 1'!RC[-7]),"""")"
        Range("N2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(IF('[laget.xls]Sida 1'!RC[-7]=0,"""",'[laget.xls]Sida 1'!RC[-7]),"""")"
        Range("P2").Select
        ActiveCell.FormulaR1C1 = _
            "=IFERROR(IF('[laget.xls]Sida 1'!RC[-12]=0,"""",'[laget.xls]Sida 1'!RC[-12]),"""")"
        Range("Q3").Select
        Selection.End(xlToLeft).Select
        Selection.End(xlToLeft).Select
        Range("A2:T456").Select
        Selection.FillDown
        ActiveWindow.ScrollRow = 429
        ActiveWindow.ScrollRow = 422
        ActiveWindow.ScrollRow = 402
        ActiveWindow.ScrollRow = 357
        ActiveWindow.ScrollRow = 355
        ActiveWindow.ScrollRow = 352
        ActiveWindow.ScrollRow = 341
        ActiveWindow.ScrollRow = 201
        ActiveWindow.ScrollRow = 194
        ActiveWindow.ScrollRow = 192
        ActiveWindow.ScrollRow = 191
        ActiveWindow.ScrollRow = 88
        ActiveWindow.ScrollRow = 42
        ActiveWindow.ScrollRow = 31
        ActiveWindow.ScrollRow = 18
        ActiveWindow.ScrollRow = 10
        ActiveWindow.ScrollRow = 2
        ActiveWindow.ScrollRow = 1
        Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Application.CutCopyMode = False
        Range("A2").Select
    End Sub
    Last edited by Mattiac; 02-08-2014 at 03:00 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problems when using macro created in Excel 2000, in Excel 2003
    By Vlada in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-27-2006, 11:24 AM
  2. Memory problems in Excel 2003
    By Richard in forum Excel General
    Replies: 4
    Last Post: 10-19-2005, 09:05 PM
  3. Excel 2003 performance problems
    By bjarvis in forum Excel General
    Replies: 0
    Last Post: 09-28-2005, 03:27 PM
  4. [SOLVED] Excel 2003 vs 2002 problems
    By Mike in forum Excel General
    Replies: 0
    Last Post: 05-27-2005, 11:05 AM
  5. Problems in Excel 2003
    By Marc (NL) in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2005, 08:06 AM

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