NO clue what I am doing -- need help auto populating

mlharris

New Member
Joined
Jan 24, 2021
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
Hello!

I am completely lost. I have scoured the internet trying to figure things out but I cannot.

I need to review documents and create a spreadsheet based on the documents. I will have different columns on the master sheet -- column A is the document number; B is the document name; C is the date; D includes all of the people associated with the document.

D will include multiple people. For simplicity, let's just say Paul, George, and Jack.

I need to create separate spreadsheets based on the people associated -- so if Paul is associated with the document on the master sheet, I need all of that information to automatically populate into Paul's separate spreadsheet.

Is there a way to do that? Also, I'm not sure what would be the easiest way to do that since there will usually be multiple people associated with a document on the master sheet. Should I list the names under each other, all in column D or what?

Any help would be greatly appreciated. Thank you.
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
12,979
Office Version
  1. 2013
Platform
  1. Windows
Can you show us exactly how the names are entered into the cells in in column D? If you can use the xl2bb tool to copy a protion of your worksheet it would help us to evaluate a method for creating your sheets for individual names. Or if the names are just listed consecutively with a consistent separator (comma, or semicolon, or space, etc.) without the word 'and' being used, thien specify which separator is used and whether it is use without a space (",") or with a space (", ") and we can probably work from that.
 

mlharris

New Member
Joined
Jan 24, 2021
Messages
2
Office Version
  1. 365
Platform
  1. MacOS
Can you show us exactly how the names are entered into the cells in in column D? If you can use the xl2bb tool to copy a protion of your worksheet it would help us to evaluate a method for creating your sheets for individual names. Or if the names are just listed consecutively with a consistent separator (comma, or semicolon, or space, etc.) without the word 'and' being used, thien specify which separator is used and whether it is use without a space (",") or with a space (", ") and we can probably work from that.
Ideally, I would like to just separate them by semicolon. Thank you so much for your help!

1611535161006.png
 

JLGWhiz

Well-known Member
Joined
Feb 7, 2012
Messages
12,979
Office Version
  1. 2013
Platform
  1. Windows
See if this does what you want. Copy to code module 1.

VBA Code:
Sub t2()
Dim sh As Worksheet, ds As Worksheet, c As Range, spl As Variant, i As Long
Set sh = Sheets("Master") 'Edit sheet name
    For Each c In sh.Range("A2", sh.Cells(Rows.Count, 1).End(xlUp))
        spl = Split(c.Offset(, 3).Value, ";")
        For i = LBound(spl) To UBound(spl)
            On Error Resume Next
                If IsError(Sheets(spl(i))) Then
                    Set ds = Sheets.Add(After:=Sheets(Sheets.Count))
                    ds.Name = spl(i)
                End If
            On Error GoTo 0
            Err.Clear
            With Sheets(spl(i))
                sh.Rows(1).Copy .Range("A1")
                .Cells(Rows.Count, 1).End(xlUp)(2) = c.Value
                .Cells(Rows.Count, 1).End(xlUp).Offset(, 1) = c.Offset(, 1).Value
                .Cells(Rows.Count, 1).End(xlUp).Offset(, 2) = c.Offset(, 2).Value
                .Cells(Rows.Count, 1).End(xlUp).Offset(, 3) = spl(i)
            End With
        Next
    Next
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,127,100
Messages
5,622,710
Members
415,922
Latest member
gemmatay88

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
Top