+ Reply to Thread
Results 1 to 5 of 5

Thread: to loop through a range

  1. #1
    Forum Contributor
    Join Date
    08-28-2010
    Location
    delhi,india
    MS-Off Ver
    Excel 2007
    Posts
    128

    to loop through a range

    Hi All,
    I am completely new to vb-excel programming.I want to have a vb code which will open a worksheet(say A) and will loop through a range in A(range is having same column ) and based on the values in the cells, i want a new worksheet(say B1) to be opened and used range to be copied from that worksheet into my new main sheet(say C).
    The value of next cell should open a new worksheet(say B2) and paste its used range right below the previous one in the main worksheet(C).
    I guess its clear what code i want.
    Any help is greatly appreciated.
    Kp

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Cochrane,Alberta
    MS-Off Ver
    XL 2003,2007,2010
    Posts
    6,843

    Re: to loop through a range

    What do you have so far?
    What do you require help with?

  3. #3
    Extremely Helpful member
    Join Date
    12-23-2006
    Location
    Belgium
    MS-Off Ver
    XL2003
    Posts
    6,127

    Re: to loop through a range

    Hi and welcome to the board
    This is an Outlook forum but your question does not seem to be related to Outlook. is that correct?
    Quoting entire posts clutters the forum and makes threads hard to read !

    If you are pleased with a member's answer then use the Star icon to rate it

    Click here to see forum rules

  4. #4
    Forum Contributor
    Join Date
    08-28-2010
    Location
    delhi,india
    MS-Off Ver
    Excel 2007
    Posts
    128

    Re: to loop through a range

    Quote Originally Posted by davesexcel View Post
    What do you have so far?
    What do you require help with?
    Thanks for responding.
    Well basically what i require is a vb code for such a situation.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Cochrane,Alberta
    MS-Off Ver
    XL 2003,2007,2010
    Posts
    6,843

    Re: to loop through a range

    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!

+ 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.2.0