Pull cell data from multiple sheets into a list on a master sheet

dustinjmangum

New Member
Joined
Sep 21, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hello,

This is my first post so I will try my best to explain what I am trying to do. For my job I have created a sheet that has a checklist for each "customer" that I have in my care. I work for a mortuary. Each person would have there own sheet. What I am wondering is if there is a way to automatically pull the data that is in a certain cell on each sheet into a list on a master sheet. For example in the screenshots below I want to pull the information from J4, and have it automatically be placed onto the summary sheet in a list under "Deceased Name." Is there away to tell excel to reference J4 of every new inserted sheet? This is my first post, so I hope I am making sense, I appreciate any and all help...
 

Attachments

  • ezgif.com-webp-to-jpg (2).jpg
    ezgif.com-webp-to-jpg (2).jpg
    137.2 KB · Views: 26
  • ezgif.com-webp-to-jpg (1).jpg
    ezgif.com-webp-to-jpg (1).jpg
    66.2 KB · Views: 26

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hello,

This is my first post so I will try my best to explain what I am trying to do. For my job I have created a sheet that has a checklist for each "customer" that I have in my care. I work for a mortuary. Each person would have there own sheet. What I am wondering is if there is a way to automatically pull the data that is in a certain cell on each sheet into a list on a master sheet. For example in the screenshots below I want to pull the information from J4, and have it automatically be placed onto the summary sheet in a list under "Deceased Name." Is there away to tell excel to reference J4 of every new inserted sheet? This is my first post, so I hope I am making sense, I appreciate any and all help...
If I was you I would create a macro, or ask someone here to help you, that creates the new sheet after you have filled in a new row on the master sheet. The macro could name the new sheet and fill in data from the master sheet.
 
Upvote 0
Hi Dustin,

On a copy of your file, you can create "Master Sheet" at the beginning of the file and add the below code to the sheet code and see how it goes :

VBA Code:
Private Sub Worksheet_Activate()
Dim wSheet As Worksheet
Dim n As Integer
Dim calcState As Long, scrUpdateState As Long

calcState = Application.Calculation
Application.Calculation = xlCalculationManual
scrUpdateState = Application.ScreenUpdating
Application.ScreenUpdating = False

n = 2
    
    For Each wSheet In Worksheets
        If wSheet.Name <> Me.Name Then
            n = n + 1
               
                If Me.Cells(n, 1) <> "" Then Me.Cells(n, 1) = wSheet.Range("J4").Value
                If Me.Cells(n, 2) <> "" Then Me.Cells(n, 2) = wSheet.Range("J5").Value
                If Me.Cells(n, 3) <> "" Then Me.Cells(n, 3) = wSheet.Range("J6").Value
                If Me.Cells(n, 4) <> "" Then Me.Cells(n, 4) = wSheet.Range("C4").Value
                
        End If
    Next wSheet
   
Application.Calculation = calcState
Application.ScreenUpdating = scrUpdateState
End Sub

Make necessary changes to suit your requirements.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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