Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: I want a Macro to do my work

  1. #11
    Board Regular
    Join Date
    Mar 2002
    Posts
    363
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Make sure you sheet name are exactly as it appears on the list. Your list has the Sheet names with 0 in front but your sheet names don't.

    "30" is not the same as "030"


    It's never too late to learn something new.

    Ricky

  2. #12
    MrExcel MVP Al Chara's Avatar
    Join Date
    Feb 2002
    Location
    Newark, Delaware
    Posts
    1,701
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Cosmos,

    From the help file on INTERSECT:

    Returns a Range object that represents the rectangular intersection of two or more ranges.

    Syntax

    expression.Intersect(Arg1, Arg2, ...)

    expression Optional. An expression that returns an Application object.

    Arg1, Arg2, ... Required Range. The intersecting ranges. At least two Range objects must be specified.

    Best regards,
    Allan Chara
    http://www.mrspreadsheets.com

  3. #13
    Board Regular
    Join Date
    Feb 2002
    Location
    Los Angeles, CA
    Posts
    752
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    OK, I kept getting the error message but I looked at the sheets and the data did transfer to 3 of the sheets, but I don't know which Macro it was because I tried all the ones that were posted. I tried them again and none of them worked???

  4. #14
    Board Regular
    Join Date
    Feb 2002
    Location
    Essex, England
    Posts
    459
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Ok, I have no idea why this should work, but it did when I tried it! (This assumes your worksheets are called 30,31.. and not 030, 031 ...)

    change the line
    Sheets(myName).Cells(12, 6) = Cells(myRow, 2)
    to
    Sheets("" & myName).Cells(12, 6) = Cells(myRow, 2)

    The only thing I can think of is that it didn't like the sheet names being numbers and this forced it to look at them as text .. maybe.. sort of...

    Hopefully this will do it for you!

    GaryB



    [ This Message was edited by: garyb on 2002-04-16 09:04 ]

  5. #15
    Board Regular
    Join Date
    Feb 2002
    Location
    Los Angeles, CA
    Posts
    752
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hey Gary, Thanks for the help. The last post you put up did the trick.

    Thank you.

    Parra

  6. #16
    Board Regular
    Join Date
    Feb 2002
    Location
    Essex, England
    Posts
    459
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Glad to have helped. (Always nice when someone says thanks as well !)
    Cheers!

    GaryB

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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