+ Reply to Thread
Results 1 to 14 of 14

vba looping

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    vba looping

    i have data in excel sheet like this attached,i want to run a macro so that loops down until it finds an empty cell and checking all the data ,it takes only the 3 storeyed ones and displays it in msgbox.please help. thanking you in advance.please check data from file buildings.



    note start cell a2
    Attached Files Attached Files
    Last edited by amu; 09-24-2012 at 01:39 PM.

  2. #2
    Registered User
    Join Date
    08-22-2012
    Location
    us
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: vba looping

    I don't see anything from your file

  3. #3
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba looping

    sent the relevant files.

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: vba looping

    Maybe this will help

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  5. #5
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba looping

    i have done it like this,
    Please Login or Register  to view this content.
    but it's not working .i need modifications on this one.like the loop will run until it fins an empty cell and after checking will add only the 3 storeyed buildings
    the result will be stored in a variable.
    Last edited by Cutter; 09-22-2012 at 11:43 AM. Reason: Added code tags

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: vba looping

    This way take longer if you have many rows to loop thru.

    Please Login or Register  to view this content.
    This way is without a loop. Very FAST!
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba looping

    i have done it like this but now it's not running.i did
    Please Login or Register  to view this content.
    need modifications on this.
    Last edited by Cutter; 09-23-2012 at 08:55 AM. Reason: Added code tags

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: vba looping

    @ amu

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.

  9. #9
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba looping

    i am awaiting response kindly help.

  10. #10
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: vba looping

    Here you go

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba looping

    Please Login or Register  to view this content.
    but i am getting the numbers not the building names.i want bthe building names.please help.

  12. #12
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: vba looping

    What column are the Building names in?

  13. #13
    Registered User
    Join Date
    09-20-2012
    Location
    wb
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: vba looping

    Please Login or Register  to view this content.

  14. #14
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,519

    Re: vba looping

    Here you go

    Please Login or Register  to view this content.

+ 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