Selecting. Multiple Worksheets as per list.

venumkd

New Member
Joined
Feb 4, 2020
Messages
45
Office Version
  1. 2010
Sirs

Kindly provide me a suitable method or VBA code for selecting multiple worksheets / tabs in a workbook. This is for a data entry work. Details are below.

The workbook is containing around 12000 random sheets out of which only 1500 worksheets are to be selected and tab coloured and they are neither adjacent nor in a particular order (Also they are to be renamed and that I shall do manually) . But the name / list of sheets/tabs to be selected shall be mentioned in the first sheet in Column A. Those sheets are to be selected. Tab coloring also I shall do according to the required color. Only selection is required now.

Thanking you, yours faithfully

VENU
 
With this code it is working. Thanks a lot.

Is it possible to rename these selected sheets as per the appropriate cell values which shall be mentioned in column B?

I dont understand.
What do you need?
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Sirs

I will explain in detail

The workbook contains around 11500 random sheets out of which only 1500 worksheets are to be selected and renamed, and they are not adjacent and not in a particular order which are mentioned in Column A in the first sheet. (They are like Sheet 1, Sheet 3, Sheet 6, Sheet 10,………….up to Sheet 11371). The selection work can be done with your above VBA code.

After that these 1500 selected sheets/tabs are to be renamed according to the cell values mentioned in the corresponding cells in Column B in the same sheet (They are like Sheet 01, Sheet 02, Sheet 03, Sheet 04…………up to Sheet 01500).

I hope the matter is clear to you and request to kindly help

Thanks & Regards

VENU
 
Upvote 0
Only selection is required now.

In your original post the requirement is only to select the sheets.
What you are now requesting is a new requirement.

In fact I misunderstood the first requirement, my macro selects all the sheets, you need to rename the sheets, and for that, it is not necessary to select the sheet. It is only to identify the sheet in column A and put the name of column B.

For that, you just need this:
Note:
Remember to change "Sheet1" to the name of your sheet where the names of the sheets are contained.


VBA Code:
Sub RenameSheets()
  Dim i As Long
  On Error Resume Next
  With Sheets("Sheet1")
    For i = 1 To .Range("A" & Rows.Count).End(xlUp).Row
      Sheets(.Range("A" & i).Value).Name = .Range("B" & i).Value
    Next
  End With
End Sub
 
Upvote 0
Sirs,

Is it possible to copy and paste a worksheet to different / non adjacent worksheets (75 to 100 Nos.) in the same workbook based on cell values?

The sheet numbers / Names (different / non adjacent) where to be pasted shall be mentioned in Column A beginning with A1 or wherever you suggest

Thanks & Regards

VENU
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top