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

  • SEARCH
  • Home
  • 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 8214769
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:34:05+00:00 2026-06-07T11:34:05+00:00

So far I’ve managed to create a search feature that scans a column and

  • 0

So far I’ve managed to create a search feature that scans a column and collect rows in an Array. Then I print the array in another sheet to form a table. I do this with a number of criteria which means that I get different arrays with different sizes.

For my problem. I want to do a calculation for each Row. ActiveCell.FormulaR1C1 =" = TRUNC ((RC [-5], RC [-1]) / 7) ". How do I make a loop that adapts to how many lines there are. There are also gaps in some places.

Here is an example for how one array is printed:

For i = 1 To nS - 1
        Sheets("DataSheet").Select
        Union(Sheets("raw_list").Cells(arrStart(i), NameCol), Sheets("raw_list").Cells(arrStart(i), PhaseCol), Sheets("raw_list").Cells(arrStart(i), ToStartCol), Sheets("raw_list").Cells(arrStart(i), ToDefineCol), Sheets("raw_list").Cells(arrStart(i), ToMeasureCol), Sheets("raw_list").Cells(arrStart(i), ToAnalyseCol), Sheets("raw_list").Cells(arrStart(i), ToImproveDevCol), Sheets("raw_list").Cells(arrStart(i), ToImproveIndCol), Sheets("raw_list").Cells(arrStart(i), ToControlCol), Sheets("raw_list").Cells(arrStart(i), ToClosedCol)).Copy
        Cells(r, 1).Select
        ActiveSheet.Paste
        With Selection.Interior
            .Pattern = xlNone
            .TintAndShade = 0
            .PatternTintAndShade = 0
        End With
        r = r + 1
    Next

Thankful for any help!

Edit: Added a picture to show how it looks.
enter image description here

  • 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-07T11:34:08+00:00Added an answer on June 7, 2026 at 11:34 am

    If there are gaps, what we use at work is a simple but not-so-elegant solution which is to add markers of some sort in adjacent columns. For example, we’d add “END” or something like that in the cell of the same row but either col + 1 or col – 1 to the column you are comparing to.

    Another solution would be to look if the next element is also a blank, but that will work only if you have single gaps.

    Finally, the last solution I see is that when you are on a blank, use xlDown and if you are at the last cell 65535 in 2003 and near a million in 2007 if my memory serves me right, then you are finished.

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

Sidebar

Related Questions

So far, I have been storing the array in a vector and then looping
As far as I know document.getElementById('myId') will only look for HTML elements that are
So far I've got: :notice :alert :error but is there definitive list, that can
so far, I have this: class Foo{ private $plugin_methods = array(); public function registerPlugin($caller,
As far as I remember, in pure W3C event model (that means, using addEventListener),
So far i wrote a code to download a file from ftp server then
So far I've got the following regex that matches against regular domains but not
Far I've found that giving the iframe a background colour will alter the timeline
As far as I know, there's no public API to collect touch points/locations at
As far as I know, in C programming language, an array is stored on

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.