Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8960569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:41:17+00:00 2026-06-15T15:41:17+00:00

I have a spreadsheet with block of data and empty rows in between. The

  • 0

I have a spreadsheet with block of data and empty rows in between. The blocks vary in size. I have a formula that auto fills the original data and then copies it over the other empty rows until it reaches the next block. How do I get it to Select the next block of data so that my loop can work, since the block’s size is always changing? What would be ideal is some kind of current region property that excludes the data behind the active cell, because the loop in it’s current state leaves the active cell as the first cell in the new block at the end of each iteration.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:41:19+00:00Added an answer on June 15, 2026 at 3:41 pm

    Whenever I have to loop something that needs to move from region to region I end up using a combination of Offset (as in Range(myRange).Offset(1,0)) and usually a .End modifying to make sure I’m always at the end of the range. As an example (psuedo code).

    Dim lastCell As Range
    Dim neededCell As Range
    
    Set lastCell = ActiveRange.End(xlDown) 'picks the last cell down
    Set neededCell = lastCell.Offset(2, 0) returns the cell two rows down from the last cell in above range.
    

    Warning, I’m doing this off the top of my head, it may require some adjustment to actually work… Also, there are xlLeft, xlRight and clUP if you need to go in those directions.

    Also, if you need to select a new range, you can do it by simply selecting a range by offset. My code might be kind of dirty (still new), but this should work.

    Dim bigRange as Range
    Set bigRange = ActiveSheet.Range(neededCell.Address & ":" & _
        neededCell.Offset(20, 20).Address)
    

    If you start with neededCell at “D5”, that should return a range of “D5:X25”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Like many, I have spreadsheet that draws data from over 40 text files as
I have a spreadsheet that runs every minute between 8am to 4pm that imports
Background I have a spreadsheet of data that I'm importing into SQL Server 2005.
I have a spreadsheet full of data with dates that look like this: Mon
I have a spreadsheet of data I am parsing using openpyxl's iter_rows function. However
I have a spreadsheet that I am sorting based on an item number column.
I have a spreadsheet I'm using to compile text that changes all the time.
I have an Excel spreadsheet that I have exported from some other program. It
I have an Excel spreadsheet that uses a TFS query to pull information on
I have an Excel spreadsheet that looks like: spreadsheet http://img186.imageshack.us/img186/6495/exelf.jpg I'd like to convert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.