extracting data and accessing multiple worksheets. want to avoid activate

morsecode

New Member
Joined
Jun 1, 2020
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Hey Guys,
I have a workbook containing several worksheets(14 to be exact). Each worksheet contains data in a standard tabular format(as in column A is for name, column B is for type and so on)

I'm working on a project which requires me to read a set of data row by row in one worksheet. Each row contains the first part of a value that I need to store, and then the name of the worksheet where the second part of the value is and the column in which I'll find it.
I have to get that second value and then add them together in a new worksheet.

Is there any way I can avoid activating the worksheets every time to get the value in a cell? Coz there are 14 sheets currently (more will be added in the near future) and activating the worksheets is rather inefficient and takes a lot of time.

Thanks.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Welcome to the forum morsecode,

If its slow try switching the application commands off, you don't need to necessarily activate each worksheet.

VBA Code:
Sub nmss()
'Turn warning off, remember to turn them back on after
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.DisplayAlerts = False
End With
Dim ws As Worksheets
For Each ws In Sheets
'With the extra code here
Next ws
'Turn warnings back on
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.DisplayAlerts = True
End With
End Sub
 
Upvote 0
Happy to help and pleased to read you have a solution.
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,257
Members
449,075
Latest member
staticfluids

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