+ Reply to Thread
Results 1 to 30 of 30

VBA to find next blank row

  1. #1
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    VBA to find next blank row

    Hi,

    I'm struggling with a macro, i have 2 data sources that i need to copy into one tab, copying the data from the first tab is fine but i need to add a line of code before copying the 2nd tab to find the next blank line after the 1st tab of data?

    Hope that makes sense?

    Code is currently
    Please Login or Register  to view this content.
    Last edited by kenadams378; 09-21-2012 at 07:08 AM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    you can find the last used row with
    Please Login or Register  to view this content.
    then the first blank is
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    If i add these to the macro will it copy the and paste the data in the next blank row?!

  4. #4
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    FBR = Cells(Rows.Count, "A").End(xlUp).Row + 1 return the number of next blank row, as you asked

  5. #5
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Thanks you, sorry if my understanding is incorrect.

    As part of the macro, i want it to select the next blank row after the previous data has been copied in then continue to format and paste the extra data in as per the code i have posted.

  6. #6
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    If you are not able to change your code attach your file for testing

  7. #7
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Attached as requested

    Appreciated
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    what do you want get with
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    I'm not sure i didn't record the macro but i assume it is selecting the data from that sheet?

  10. #10
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    attach your file and describe what you want

  11. #11
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    File is already attached

  12. #12
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    ok, File is already attached, but you did not explain your goal, forget your macro.

  13. #13
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Ah ok.

    Using the data from the GI B2 TB & GI C2 TB tabs i want to populate the GI Data tab with both sets of information.

    The macro i currently have formats the data and will populate the table buti want to paste the GI C2 TB underneath the GI B2 TB on the Gi Data tab.

  14. #14
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Any luck with my detail above?

  15. #15
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Have you found a solution to this at all?

  16. #16
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Is this something you can advise on? I need to workout code to copy & paste in the next blank cell??

  17. #17
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    From forum rules
    If your question has not been answered within a day, consider adding another post with any additional information you believe is relevant. If you think your post is good as is, just reply to your own thread with the words "Bump no response", which will bring it to the top of the forum.

    can you add a sample of Gi data filled ?
    Last edited by patel45; 09-17-2012 at 10:23 AM.

  18. #18
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    As requested, filled 'Gi Data'

    The code would find the next balnk cell which would be column A cell 865
    Attached Files Attached Files

  19. #19
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    Ther'is no sheet 'Gi Data' in the attached file

  20. #20
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Sorry the sheet name is incorrect, the sheet name should be GI Data

  21. #21
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    check please the attached file

  22. #22
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    I can't see your attached file?

  23. #23
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    I've attached my file again
    Attached Files Attached Files

  24. #24
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    "Bump no response"

  25. #25
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    in the first post you attached a macro with this line
    Please Login or Register  to view this content.
    then you have a sheet named GI Data in your workbook, I'm waiting for you to attach the entire workbook

  26. #26
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Ah sorry i wasn't aware you wanted the full workbook...

    The workbook is over 4mb

  27. #27
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    I don't need all data, I need to see the structure, then all columns but 20 rows a sheet

  28. #28
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Structure as requested
    Attached Files Attached Files

  29. #29
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to find next blank row

    Quote Originally Posted by patel45 View Post
    I don't need all data, I need to see the structure, then all columns but 20 rows a sheet
    sheet 'Gi Data' is empty.
    I'm sorry, but I can not make myself understood by you, now I stop.

  30. #30
    Forum Contributor
    Join Date
    05-01-2012
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    822

    Re: VBA to find next blank row

    Do you need to see 20 lines of data on the GI Data tab?

+ 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