+ Reply to Thread
Results 1 to 8 of 8

AutoFill Copy/Paste into filled cells

  1. #1
    Registered User
    Join Date
    06-10-2009
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    46

    AutoFill Copy/Paste into filled cells

    Hi,

    I have a question regarding AutoFill and Copy/Paste. When I want to have a VBA Code that copies a cell format into another cell. However, a problem seems to occur when I paste into cells that are already filled with values. Excel has an error and crashes, so I dont have an error message to this. The same happens when I use AutoFill.

    Here's my code:

    Please Login or Register  to view this content.
    wb1 and wbdata are two differnt worksheets. u and i are variables that determine the last filled row in wb1 resp. wbdata. The code works fine for the first two lines shows here (Pasting into empty row), but yields an error when I use the last two lines.

    Would be great if someone could help me on this!

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Problem with AutoFill Copy/Paste into filled cells

    Do you have any merged cells or array formulas?
    Remember what the dormouse said
    Feed your head

  3. #3
    Registered User
    Join Date
    06-10-2009
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Problem with AutoFill Copy/Paste into filled cells

    What is an array formula? Dont have any merged cells

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Problem with AutoFill Copy/Paste into filled cells

    I am referring to a formula that is array entered into multiple cells at once (by selecting them and pressing Ctrl+Shift+Enter to array-enter the formula into all cells at once) I would guess you probably don't from your response.
    I assume the value of i is greater than 1 when you start out?

  5. #5
    Registered User
    Join Date
    06-10-2009
    Location
    Germany
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Problem with AutoFill Copy/Paste into filled cells

    Ok, thanks. No, I didnt know about Array formulas indeed.

    i is larger than 1, as it refers to the last row, that is filled in the excel spreadsheet. I have tested the code with selecting the row instead of pasting values and it works. However, once I tell the program to AutoFill or Paste, Excel crashes.

  6. #6
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Problem with AutoFill Copy/Paste into filled cells

    Can you post a sample showing the problem?

  7. #7
    Registered User
    Join Date
    01-14-2010
    Location
    Houston, TX
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Problem with AutoFill Copy/Paste into filled cells

    I am having this issue with excel 2007... I have a spreadsheet that I am trying to use auto fill on... everytime i drag it down and hit save the program quits responding... I AM SO FRUSTRATED!. I am sure that there is an easier way, but I don't know it. Here is my formula that I am dragging down whenever I fill in the other cells.

    =D12+B13-C13

    so the items in column B are charges and in C are credits and D is the total... so when I type something in B or C I drag down the D cells so it does the math.

    THANKS IN ADVANCE

  8. #8
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: AutoFill Copy/Paste into filled cells

    Welcome to the forum, caponti.

    Please take a few minutes to read the Forum Rules about posting questions in other people's threads (and in general), and then start your own. You can include a link to this thread if it's particularly relevant.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

+ 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