+ Reply to Thread
Results 1 to 4 of 4

Looping Help

  1. #1
    Registered User
    Join Date
    11-06-2013
    Location
    Elkhart, Inidana
    MS-Off Ver
    Excel 2010
    Posts
    2

    Looping Help

    Hi, I am a newbie to VBA and I am having trouble figuring out how to repeat my code pulling in a new value. I am trying to search one worksheet for a specific value and copy the entire row containing that data to a new worksheet. I have the program working for one specific value, but I need to repeat the process for all of the unique values in the worksheet. Can anyone help me with this? Here is the code I have currently in my workbook:

    Please Login or Register  to view this content.
    I am using Excel 2010 in case that is helpful.

    Thanks
    Last edited by alansidman; 11-07-2013 at 01:16 AM. Reason: code tags added

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Looping Help

    where are your unique values stored?

    Assuming Column A

    Find the last row in column A = LR

    then

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-06-2013
    Location
    Elkhart, Inidana
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Looping Help

    The values are customer names and they are located in column B. I'll give this a try using column B. Thanks

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Looping Help

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (I have added them for you. Please read the rules and abide by them in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Do Until Looping (not looping through all other columns)
    By orle8050 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-11-2013, 10:37 AM
  2. Looping
    By Nordeen1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-15-2012, 12:31 PM
  3. Looping
    By Baziwan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2010, 01:05 PM
  4. Looping I think??
    By jimmyquinn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2007, 08:24 AM
  5. Little Looping
    By Stuie in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2006, 06:14 AM

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