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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T01:45:57+00:00 2026-06-04T01:45:57+00:00

I have an ActiveSheet script, in where I take raw data move the data

  • 0

I have an ActiveSheet script, in where I take raw data move the data to rows Q:V. I have a VBA script that runs and shows where the last row is, in this case the last row is 77.

lastrow = .Cells(.Rows.Count, "Q").End(xlUp).Row

I want to have it where it takes from Q to V last row, copy, and paste it into sheet 1…

I am guessing it will look like this, but I want to verify here first… since my normal sites I go to are down for maintenance for some reason.

Sub test()
         Dim wsPOD As Worksheet
    Dim wsPOT As Worksheet
    Dim wsPOA As Worksheet
    Dim cel As Range
    Dim lastrow As Long, i As Long, Er As Long

    Set wsPOD = Sheets("PO Data")
    Set wsPOT = Sheets("PO Tracking")
    Set wsPOA = Sheets("PO Archive")

        With ActiveSheet
            .AutoFilterMode = False
            Intersect(.UsedRange, .Columns("A")).Cut .Range("Q1")
            Intersect(.UsedRange, .Columns("D")).Cut .Range("R1")
            Intersect(.UsedRange, .Columns("C")).Cut .Range("S1")
            Intersect(.UsedRange, .Columns("B")).Cut .Range("T1")
            Intersect(.UsedRange, .Columns("G")).Cut .Range("U1")
            Intersect(.UsedRange, .Columns("F")).Cut .Range("V1")
            lastrow = .Cells(.Rows.Count, "N").End(xlUp).Row
            Intersect (.UsedRange.Range("Q:V" & lastrow).Copy)
            Intersect (wsPOT.Range("B3:H" & lastrow).PasteSpecialxlPasteFormats)
         End With
End Sub

This obviously doesn’t work, if someone can help me it be appreciated.

  • 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-04T01:45:58+00:00Added an answer on June 4, 2026 at 1:45 am

    Is this what you are trying>

     With ActiveSheet
        .AutoFilterMode = False
        '
        '~~> Rest of the code
        '
        lastRow = .Range("N" & Rows.Count).End(xlUp).Row
        .Range("Q1:V" & lastRow).Copy
        wsPOT.Range("B3").PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
     End With
    

    xlPasteFormats will only paste the formats and not the value. If you want to paste value then change xlPasteFormats to xlPasteValues

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

Sidebar

Related Questions

I have this VBA below that is designed to loop through each WS and
i have this code in javascript a= Excel.Workbooks.open(C:/work/ind12.xls).ActiveSheet.Cells.find(value); if(a == null) document.getElementById('dateValid').innerText = Date
I have this code in JavaScript a= Excel.Workbooks.open(C:/work/ind12.xls).ActiveSheet.Cells.find(value); alert(a); Excel.close(); Excel = new ActiveXObject(Excel.Application);
I want to have/define a unique id for each data row in my Excel
I have this code: Sub addDropdown(Name) ActiveSheet.DropDowns.Add(74.25, 60, 188.25, 87.75).Select Set n = ActiveSheet.DropDowns(Name)
I have the following VBA code inside an Excel macro: With ActiveSheet.QueryTables.Add( _ Connection:=ConnStr,
Today I have just thrown together this PowerShell script which takes a tab-delimited text
I have two codes, below, one that hides and the other that unhides rows
I have a working excel vba macro that does what I want from here
I have an Excel VBA macro that creates a folder tree based on an

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.