+ Reply to Thread
Results 1 to 11 of 11

Fill down to last cell containing data

  1. #1
    Registered User
    Join Date
    11-03-2011
    Location
    Northants, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Smile Fill down to last cell containing data

    Hi
    I am sure this is probably a quick fix but I can't get my head around the solution.

    I have the following code:
    Please Login or Register  to view this content.
    What I need to do is to continue to fill down until " " (or a null value) is found within A*:D*


    Please can anyone help me ?
    Last edited by Courtneydog; 11-09-2011 at 02:48 PM. Reason: Mark as solved

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,479

    Re: Not sure how to fill down to last cell containing data from range

    Maybe:

    Please Login or Register  to view this content.

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    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


  3. #3
    Registered User
    Join Date
    11-03-2011
    Location
    Northants, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Not sure how to fill down to last cell containing data from range

    Thanks for that.


    I am not sure why, but this only brings in the first 3 records.
    Last edited by Courtneydog; 11-04-2011 at 03:58 PM.

  4. #4
    Registered User
    Join Date
    11-03-2011
    Location
    Northants, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Copy from sheet1 to sheet 2 until blank rows in sheet 1

    Hi I am struggling with this question.

    TMShucks gave me a solution (thank you) and after solving my own coding error (just row numbers) , I now have that bringing in the first 4 rows of data, but no more.

    My (revised) vba is thus:

    Please Login or Register  to view this content.
    My problem is that the worksheet "Import" has approx 30 rows (varies) and I need to bring them all into the "Export" sheet.



    Any help very much appreciated.
    Last edited by Courtneydog; 11-08-2011 at 09:20 AM.

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,479

    Re: Not sure how to fill down to last cell containing data from range

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  6. #6
    Registered User
    Join Date
    11-03-2011
    Location
    Northants, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Not sure how to fill down to last cell containing data from range

    Humble apologies. Rules digested.

    Explanation:
    I have (had) a working spreadsheet which took a csv from my bank, processed the data and prepared it for export to MS Money.

    My bank have decided to separate two previously joined data streams and I now need to concatenate transaction type and description into one field. I have done this by outputting concatenated results to a second worksheet (Export)

    All I need to do now, is get the Export sheet, to reflect all of the rows within the Import sheet. At present, I am only getting visibility of the first three rows.

    I hope this makes sense.

    I have attached the csv (as xls) from the bank (with dummy data) and my spreadsheet.

    Many thanks
    Attached Files Attached Files

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,479

    Re: Not sure how to fill down to last cell containing data from range

    Please fix the Code Tags, as requested ... in both the posts with code extracts.

    Thanks

  8. #8
    Registered User
    Join Date
    11-03-2011
    Location
    Northants, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Not sure how to fill down to last cell containing data from range

    Quote Originally Posted by TMShucks View Post
    Please fix the Code Tags, as requested ... in both the posts with code extracts.

    Thanks
    Tags added as requested
    Last edited by Courtneydog; 11-08-2011 at 09:33 AM.

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,479

    Re: Not sure how to fill down to last cell containing data from range

    Thanks for fixing the code tags.

    Amended code:

    Please Login or Register  to view this content.

    Output:
    HTML Code: 

    The output starts in row 3; I trust this is what you want.

    Regards, TMS

  10. #10
    Registered User
    Join Date
    11-03-2011
    Location
    Northants, England
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Not sure how to fill down to last cell containing data from range

    Fixed - many, many thanks

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,479

    Re: Fill down to last cell containing data

    You're welcome.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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