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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:01:07+00:00 2026-06-04T11:01:07+00:00

Update: I was able to solve this problem. I just remembered VBA use *

  • 0

Update: I was able to solve this problem. I just remembered VBA use * and ? to present the string ‘If Sheet.name Like “*CopyA“‘


I would like to make a copy special value with original format of the sources of all sheets contains the word: “CopyA” for example “Apple CopyA”,”Mango CopyA”

I can use the macro record to see how VBA create sheet and copy special like similar example below.

I am having trouble in the searching for sheet name – All examples I found either I must know exact name (same as Macro record) or I have to make a copy of all sheets (loop though all sheet and copy, no matter the name is).

Sub Macro1()
    Sheets("Sheet1").Select
    Sheets("Sheet1").Copy Before:=Sheets(1)
    Sheets("Sheet1(2)").Select
    Cells.Select
    Selection.Copy
    ActiveSheet.Paste
    Application.CutCopyMode = False
    Selection.Copy
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
End Sub

How can I search for sheet’s name? In this case, any sheet that has “CopyA”?

  • 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-04T11:01:09+00:00Added an answer on June 4, 2026 at 11:01 am

    Another way 🙂 You can also use Instr(). For example

    For all sheets in the workbook, use this

    Option Explicit
    
    Sub Macro1()
        Dim ws As Worksheet
    
        For Each ws In ThisWorkbook.Sheets
            If InStr(1, ws.Name, "CopyA") Then
                '~~ > Your code
            End If
        Next
    End Sub
    

    For ActiveSheet use this

    Option Explicit
    
    Sub Macro1()
        If InStr(1, ActiveSheet.Name, "CopyA") Then
            '~~ > Your code
        End If
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I haven't been able to solve this problem for several days now and I'm
I have a table that I would like to be able to present ranked
I am not sure if there is a quick way to solve this problem.
I know, this is just so common. However, I am not able to get
I have a very specific problem in T-SQL. If I can solve this example
I've found this question , which doesn't really solve my problem but at least
Update : I just found this documentation page . Wish there was a link
I need to be able to update my config file programmatically and change my
I was wondering how you might be able to update a CURL (PHP) request
I need to be able to insert/update objects at a consistent rate of at

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.