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.
 

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
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.
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

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