+ Reply to Thread
Results 1 to 11 of 11

Macro - Fill Series Requires Two Rows of Data!?

  1. #1
    Registered User
    Join Date
    08-18-2007
    Posts
    11

    Red face Simple Fill Series Macro Not Working

    Hi,

    Thanks to the guys for helping me out before (RoyUK, GregM, Mudraker).

    The new problem regards the two attached files (both are identical) except '1' has TWO Rows of data above the Macro Button and works correctly whereas '2' has only ONE Row (the desired option but does not work correctly!!!( Inserts Row in wrong place and incorrectly fill series)).

    Sorry I can't be clearer, basically the program inserts a additional row below the last data entered, copies a formula cell from above and finally (the problem area) Series Fills a cell from data above.

    Can any one help?

    Thanks,

    Paddy
    Attached Files Attached Files
    Last edited by Paddy9; 08-19-2007 at 07:40 AM. Reason: Clarify

  2. #2
    Forum Contributor
    Join Date
    07-05-2007
    Location
    Lexington, MA
    Posts
    302

    .END starts its search from the next cell

    In the following code, the .END(xlDown) property function seems to start its search at the next cell down, not on the named cell (A6). So, A7 is blank, it stops on A8, and offset +1 sets to row 9. In the #2 workbook.

    If you start from A4, it works.

    Please Login or Register  to view this content.
    FrankBoston is the pen name for Andrew Garland, Lexington MA

  3. #3
    Registered User
    Join Date
    08-18-2007
    Posts
    11

    Angry Further Help Required!

    Hi,

    Thank you Frank for trying to help.

    However, I have made the change you suggested, pressed the Button and it worked BUT when I pressed it again the Series fill does not work, the cell is just copied.

    Can anyone Help - I seem so close, yet so far!

    Thanks,

    Paddy

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Should this be changed?

    Please Login or Register  to view this content.
    Maybe

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  5. #5
    Registered User
    Join Date
    08-18-2007
    Posts
    11
    Hi,

    I have just tried that but that flags up issues on the next line.

    Any other suggestions?

    Ragards,

    Paddy

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    What exactly are you trying, I thought that the code I provided yesterday worked.

    To be honest i would totally redesign that sheet.

  7. #7
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481
    Hi Paddy,

    Here's a work-around for the version 2 problem.

    First of all unmerge cell A4 so that it becomes cells A4 & A5, then type something (anything!) in cell A5.

    Then change the third line of your VB code so that it reads:
    Please Login or Register  to view this content.
    i.e. 5 instead of 6 - this means that the region whose ".End" property is used begins in cell A5 rather than cell A6.

    This produces the desired effect on the version you sent me.

    I think that the basic problem is that in version 2, cell A6 is both the beginning and the end of a region (whose ".End" property is used). In version 1, cell A6 is the beginning of the region but the region ends at cell A7. Hope this makes sense.

    Anyway, thanks for the feedback, good luck, hope this helps you out, but feel free to "call again" if there are further issues.

    All the best,

    Greg M

  8. #8
    Registered User
    Join Date
    08-18-2007
    Posts
    11
    Yes, your help yesterday was perfect - thank you.

    Basically the worksheet is intended to be filled in by each individual in the department. I had intended each person to have their own worksheet in the book and then a final department summary/total sheet.

    The aim was to make a template worksheet so that any new recruits could be given and have their name assigned to a new sheet tab. (Hope that makes sense).

    You can see the header, then the different types of data that must be filled in, then the indivuals summary (including monthly company card totals to check against statements). Each individual has their own purchase No. and it increments by 1 each order/purchase. I also wanted the sheet to make it easy for the individual to check they had filled in all the amounts (vat etc.) correctly.

    The reason for the macro was to make it as simple as possible for the individual to add a new row without messing up formulas and continue their purchase No..

    I hope that makes things more understandable. Thanks again for your help.

    Regards,

    Paddy

    ps If all else fails I will have to work with what I have got and maybe have some sort of hiden? / blank line at A:6???

  9. #9
    Registered User
    Join Date
    08-18-2007
    Posts
    11

    Thank you.

    Thank you Greg and Roy for all your kind help.

    Cheers,

    Paddy

  10. #10
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481
    Hi again Paddy,

    The attached version seems to do the trick. Glad to have helped so far.

    All the best,

    Greg M
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    08-18-2007
    Posts
    11
    Thanks,

    Paddy

+ 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