Beginner Help

jessedharris

New Member
Joined
Oct 20, 2017
Messages
9
So I am have quite a task, I have a spreadsheet with a bunch of accounts, and they have the county, account name, address etc.... I want to bring them into separate tabs based on the county. I have a tab already for each county, just trying to figure out how I can bring them from the master sheet to the sheet with the proper county. (i update the master sheet and when I add a new account i want it to update on the proper county tab). I have tried vlookup, if, match, etc... I can not get anything to work. Any advise. I could use a pivot table, but the data doesn't change(its not "live")


Thanks

Jesse
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Are you willing to use Vba?

If so what column number do you enter the country name into?
I need like column "A" or Column (1)
And it would be best to enter the country name using a data validation list to be sure country name is always exactly as the sheet name.

So when you choose the country name from the data validation list all the data in that row will be copied to that country's sheet.
 
Upvote 0
I have used Visual before, but it was many years ago.

What I have now, is 1 tab with all the master data on it. Col a has the county name in it. i want to be able to take the sheet named "clay" put "clay" in cell a1 and it populate a2:axx anything from "master data" that has clay listed in a1.

Does this make sense?
 
Upvote 0
No I do not understand:

You have a sheet named : "master data"
You have a sheet named "Clay"
And then you have sheets named for countries.
I know of no country named "Clay"

And there is no such range as: a2:axx

put "clay" in cell a1 and it populate a2:axx anything from "master data" that has clay listed in a1.
 
Upvote 0
I dont know if I am explaining it well, I am looking up counties, not countries.

I have a spreadsheet, inside the spreadsheet I have 68 (sheets or Tabs), 1 for each county in Florida plus the "master" that has all the data(customers name, address, city, zipcode, etc). In column A on the "master" sheet is the list of the county(example "clay county"). I want to take the tab/sheet labeled "clay" have cell "A1" data as "Clay" and then it pulls any data from the master that has "clay" in column A, and populate that data on sheet "clay" starting in cell a2. Then I would move to the next sheet/tab labeled "dixie", same setup.
 
Upvote 0
I set sheet name as "Master"
If it is as you said "master"
Modify script where you see "Master"

Try this:
Code:
Sub Copy_Counties()
Application.ScreenUpdating = False
Dim i As Long
Dim Lastrow As Long
On Error GoTo M
Lastrow = Sheets("Master").Cells(Rows.Count, "A").End(xlUp).Row
Dim ans As String
    For i = 1 To Lastrow
    ans = Sheets("Master").Cells(i, 1).Value
        Sheets("Master").Rows(i).Copy Sheets(ans).Rows(Sheets(ans).Cells(Rows.Count, "A").End(xlUp).Row + 1)
    Next
Application.ScreenUpdating = True
Exit Sub
M:
MsgBox "No such sheet as  " & ans & " exist"
Application.ScreenUpdating = True
End Sub
 
Upvote 0
Im not getting it to work, can I email you or upload the sheet, this is hard to describe what I am wanting to do.

ThANKS
 
Upvote 0
I thought you said:
You have sheet names in column (A) of a sheet named "Master"

And you want the script to copy that rows data to the sheet name in column (A)

So if "George" is in column "A" of sheet named "Master" then copy that row of data to sheet named "George"

And keep going as long as there is data in column "A" of sheet named "Master"

If that is not what you want then I'm still confused.
 
Upvote 0
jessedharris,

Welcome to the MrExcel forum.

So that we can get it right on the first try, can we see your workbook/worksheets?

You can post your workbook/worksheets to the following free site (sensitive data changed), mark the workbook for sharing, and, provide us with a link to your workbook:

https://dropbox.com
 
Upvote 0
"Current Accounts"
1_zpskv0ctju3.png



"Alachua"
1_zpskv0ctju3.png
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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