+ Reply to Thread
Results 1 to 8 of 8

Specific line of my macro isnīt working as expected

  1. #1
    Registered User
    Join Date
    08-29-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    34

    Specific line of my macro isnīt working as expected

    Hi everyone.
    I wrote a macro to copy values of adjacent cells. All is doing fine, but for some reason I canīt explain, only one of the cells is not being copied. What could it be?

    Please Login or Register  to view this content.
    The line I referred is the last one: "ActiveCell.Offset(8, 0) = ActiveCell.Offset(8, -1)"

    Tnx!

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Specific line of my macro isnīt working as expected

    If the active cell is column A, you can not go to left of it

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Specific line of my macro isnīt working as expected

    If the active cell is column A, you can not go to left of it

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Specific line of my macro isnīt working as expected

    Hello Marceltcm,

    What AB33 says is correct. If it is not Column A, then it would be better if you could provide us with a sample Workbook, for us to have a look at for you.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Specific line of my macro isnīt working as expected

    Actually, the code has got few errors.
    Most likely

    Please Login or Register  to view this content.

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Specific line of my macro isnīt working as expected

    @ AB33,

    LOL I bet your guess is spot on! I do not have a crystal ball like you, and that is why I would prefer a sample Workbook.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Specific line of my macro isnīt working as expected

    Winon,
    Yes, you are right, it makes life easy for everyone involved if the OP could attach a sample book. Poor guess can sometimes lead to opening a Pandora box, and do not know how to handle this hidden treasure. So, you are right to stick by your approach.

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Specific line of my macro isnīt working as expected

    @ AB33,

    I just love your sense of humour.

    ...Poor guess can sometimes lead to opening a Pandora box...
    Lets hope we have a sample Workbook to open instead.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to copy specific line from text file and paste into specific cell in excel
    By keeneye in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2013, 10:35 AM
  2. String not working as expected
    By WilyOne in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-21-2011, 08:44 AM
  3. For Each Statement not working as expected
    By Jacqui in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2005, 06:20 PM
  4. [SOLVED] For Each Statement not working as expected
    By Jacqui in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2005, 06:17 PM
  5. [SOLVED] Lookup Not working as expected
    By trumpy81 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 06-30-2005, 03:05 PM

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