+ Reply to Thread
Results 1 to 10 of 10

Row by row...

  1. #1
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Row by row...

    Hi.
    I'm trying to get a formula to autofill, row by row, until the bottom row. I have the last row figured out, but I'm having trouble getting my loop to work.

    Here's what I have so far.
    Please Login or Register  to view this content.
    My goal is to have the formulas in Column "B" auto fill to the right from "B2" to "B & the last row or 'LastR'

    I keep getting an 'Object Required' error and I don't know what to do next.

    Any help is greatly appreciated.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,520

    Re: Row by row...

    It's really not clear what you want to copy and where you want to copy it to.

    The code's also a bit confusing, for example you have a loop that appears to be looping rows but the code in it seems to be for columns and copying right.

    This code will compile and run but I've no idea if it'll do what you want.


    Please Login or Register  to view this content.
    Last edited by Norie; 07-08-2013 at 03:19 PM.
    If posting code please use code tags, see here.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    31,932

    Re: Row by row...

    You don't say where you get the error but I guess it's here:

    Please Login or Register  to view this content.

    This should probably be:

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16
    Posts
    50,615

    Re: Row by row...

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    07-08-2013
    Location
    Fort Wayne, IN
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Row by row...

    I have a similar issue in which I am trying to enter a formula in each row as it goes to the bottom of my table. The formula is a summation of the 5 cells to the left (in the same row). I know it must be a for statement, I just don't know how to word it. I have used the above mentioned code as reference:

    Please Login or Register  to view this content.
    Any ideas on how to sum up the related rows?

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,520

    Re: Row by row...

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.

  7. #7
    Registered User
    Join Date
    07-08-2013
    Location
    Fort Wayne, IN
    MS-Off Ver
    Excel 2010
    Posts
    61

    Re: Row by row...

    My apologies; please see the related thread at the following url: http://www.excelforum.com/excel-prog...ws-macros.html
    Thank you

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,520

    Re: Row by row...

    No problem.

  9. #9
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Row by row...

    Hey Norie.

    Thanks for the help.
    As I am in violation of forum rules (my bad), I'm starting another thread with my complete macro and a more descriptive problem and title.

    The code you provided did remove my compile error.

    Thanks again!

  10. #10
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,520
    Trevasaurus

    You didn't need to start a new thread, just change the title of this one.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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