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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:08:38+00:00 2026-05-31T19:08:38+00:00

I have 2 worksheets, I need to update with data from another worksheet I

  • 0

I have 2 worksheets, I need to update with data from another worksheet I receive every week. I wonder if its possible
to copy the data into the excel file with the 2 worksheets I need updating and then run a macro that selects the cells i need to output to the other worksheets.
I don’t know if i am being clear enough, below is an example.

For example I have the following sheet, I need to look though the “name” column and if the name begins with “sony”, copy the cells i need to the sony worksheet, if it begins with Samsung copy the cells i need to the Samsung sheet and so on.

I suppose that copying the whole row then deleting the columns I don’t need will also work.

Main Sheet Example

Name            --- Type --- Extra --- Year --- Power
Sony TV --- LCD --- CAM --- 2009 --- 90W
Samsung TV --- LED --- WIFI --- 2010 --- 70W
Sony TV --- LCD --- SAT --- 2011 --- 90W
Hitachi TV --- LED --- CAM --- 2012 --- 70W

Sony Sheet Example
Name --- Type --- Year --- Power

Samsung sheet Example
Name --- Type --- Year --- Power

  • 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-31T19:08:39+00:00Added an answer on May 31, 2026 at 7:08 pm

    I would use an AUTOFILTER on column A to get just the rows I want visible, then we can copy just the columns we want. In this example, the shtARR is used for both the sheetnames and the filter, so make your target sheet names match, Sony, Samsung, Hitachi, etc. Then try this:

    Sub VendorFilters()
    Dim ws2 As Worksheet, LR As Long
    Dim shtARR As Variant, i As Long
    
    'assuming these are the names of the target sheets, we can use for filtering, too
    shtARR = Array("Sony", "Samsung", "Hitachi")
    
    With Sheets("Main")                 'filtering the sheet with the original data
        .AutoFilterMode = False         'turn off any prior filters
        .Rows(1).AutoFilter             'new filter
    
        For i = LBound(shtARR) To UBound(shtARR)
            Set ws2 = Sheets(shtARR(i))         'if you get an error here, check the sheet names
    
            .Rows(1).AutoFilter 1, shtARR(i) & "*"          'new filter for current value
            LR = .Range("A" & .Rows.Count).End(xlUp).Row    'last row with visible data
    
            If LR > 1 Then                  'if any rows visible, copy wanted columns to sheet2
                .Range("A2:A" & LR).Copy ws2.Range("A1")
                .Range("C2:D" & LR).Copy ws2.Range("B1")
            End If
        Next i
    
        .AutoFilterMode = False             'remove the filter
    End With
    
    End Sub
    

    Autofilters are nice, they allow you to avoid looping row by row, but it means you can’t have blank rows in the data. Sort the data before to remove the blanks, if present.

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

Sidebar

Related Questions

I have a need to copy a worksheet from one workbook into another and
I have some data in an Excel Worksheet. I would like to select all
I am creating an Excel Worksheet from C# using Microsoft.Office.Interop.Excel, and I have not
I need to import data from Excel into a SQL 2000 db. I need
I have a code that loads data from Excel into SQLServer table. It works
I need to have access to a SQL worksheet in 11g for my coursework.
I have a workbook with three worksheets titled FY09, FY10, and FY11. I need
I have about 50 or so Excel workbooks that I need to pull data
I need to get data from an Excel file to print them in a
I'm trying to update a price list from one workbook to another except I

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.