+ Reply to Thread
Results 1 to 7 of 7

Looping through ranges in worksheet

  1. #1
    Registered User
    Join Date
    11-17-2009
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    27

    Looping through ranges in worksheet

    Hi guys

    One that is scratching my head.

    In a nutshell, I need to copy and paste spec values, from Sheet X to Sheet Y. (this bit I can do!!!)

    The size of the range in Sheet X is always the same - 5 columns by 20 rows.

    My problem is that I need to do this for every range of data that exists in the sheet - can anyone help with programming this?

    The data looks similar to the attached...

    Thanks!

    example.jpg

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,168

    Re: Looping through ranges in worksheet

    Please attach a sample excel file instead of a jpg.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    11-17-2009
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Looping through ranges in worksheet

    Example in xlsx format attached.

    Sheet X is the original data

    Sheet Y is what I need the result to look like.

    Thanks for any help
    Attached Files Attached Files

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Looping through ranges in worksheet

    try it
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-17-2009
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Looping through ranges in worksheet

    This works brilliantly - in fact - too good!

    For my actual workbook that it would be used in, I don't need to copy the headers. Which section should I edit for this? I am guessing it is around the offset part - but I don't fully understand the coding just yet.

    Thanks again - appreciate it.

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Looping through ranges in worksheet

    this line
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-17-2009
    Location
    Manchester
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Looping through ranges in worksheet

    Brill!! Thank you very much!


+ 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