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 6630077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T22:21:06+00:00 2026-05-25T22:21:06+00:00

I have a variant like these var = sheet1.Range(A1:P3600).Value I have done some operarions

  • 0

I have a variant like these

var = sheet1.Range("A1:P3600").Value

I have done some operarions and pushed the unwanted rows to the top in the variant. Now I have to copy the var variant to the other sheet from a certain range.

sheet1.range("A3444:P" & i).value = var(range(cells(r,"A").cells(l,"P"))

that is say var(350 to end of var) should be copied to the other sheet. Is it possible ? can we do like that ?

  • 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-05-25T22:21:07+00:00Added an answer on May 25, 2026 at 10:21 pm

    One way is to dump the reduced array to a second array, then the second array to your range

    The code below makes a variant array with 3600 rows by 16 columns (ie A:P), data is dumped into the array for sample data (note you already have this array as Var), then a variable is used as a marker to reduce the array to a second array, the second array is then written to the range.

    Updated to match your exact data locations. In your case you have Var1 already (your Var), so you just need the second portion of the code that starts at lngStop = 350 and make my code Var1 references Var

    Sub TestME()
    Dim Var1
    Dim Var2
    Dim lngCnt As Long
    Dim lngCnt2 As Long
    Dim lngCnt3 As Long
    Dim lngCnt4 As Long
    Dim lngStop As Long
    Var1 = Sheet1.Range([a1], [p3600]).Value2
    For lngCnt = 1 To UBound(Var1, 1)
        For lngCnt2 = 1 To 16
            Var1(lngCnt, lngCnt2) = "I am row " & lngCnt & " column " & lngCnt2
        Next lngCnt2
    Next lngCnt
    lngStop = 350
    ReDim Var2(1 To UBound(Var1, 1) - lngStop + 1, 1 To UBound(Var1, 2))
    For lngCnt3 = lngStop To UBound(Var1, 1)
        For lngCnt4 = 1 To UBound(Var1, 2)
            Var2(lngCnt3 - lngStop + 1, lngCnt4) = Var1(lngCnt3, lngCnt4)
        Next lngCnt4
    Next lngCnt3
    Sheet1.[a3444].Resize(UBound(Var2, 1), UBound(Var2, 2)).Value2 = Var2
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a variant like these ranging from var(1,42) to var(4000,42) I have done
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
I have an iterable of entries on which I would like to gather some
I want to delete certain records from a table. These records have some child-records
I have a simple poll application with models like these: class Question(models.Model): text =
Certain fonts have a variant for outline and filled, and if you use these
I have a variant for initializing DbRecordData public class DbRecordData : IList<DbFieldValue>, ICollection<DbFieldValue>, IEnumerable<DbFieldValue>,
If I have a variant array which holds nothing but simple types, and possible
Given a variant, does VBScript have an equivalent of C#'s DateTime.TryParse method?
I have several domain names registered, each a slight variant of each other. E.g,

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.