Copy rows into appropriate worksheets meeting criteria

vgirl76

New Member
Joined
Oct 20, 2005
Messages
31
I have a worksheet that contains 2 Rn managers per 3 Site and 2 TSR managers per 3 Site.
I want to be able to sort these managers by Site into 6 tabs: 3 RN tabs and 3 TSR tabs.
I want to keep the original worksheet as is and copy the appropriate rows to the designated worksheets labeled SACRN SACTSR VALRN VALTSR and so on. The data range is A:M

The columns of value is A (JOB) and B (SITE) and here is the sample of the data

JOB SITE TEAM
RN SITE SAC GASTON SUSAN TEAM SAC BERNAL
RN SITE SAC GASTON SUSAN TEAM SAC CASTILLO
RN SITE SAC GASTON SUSAN TEAM SAC CASTILLO
RN SITE VAL RANADA TERESA TEAM VAL RINCON
RN SITE VAL RANADA TERESA TEAM VAL RINCON
RN SITE VAL RANADA TERESA TEAM VAL RINCON
RN SITE SAC MCINNIS JOHN TEAM SAC SMITH
RN SITE SAC MCINNIS JOHN TEAM SAC LEMON
RN SITE SAC MCINNIS JOHN TEAM SAC JACK
TSR SITE SAC GRECO DAVE M TEAM SAC KEN
TSR SITE SAC GRECO DAVE M TEAM SAC ROGERS
TSR SITE SAC GRECO DAVE M TEAM SAC LOPEZ
TSR SITE SAC SHAVER KELLY TEAM SAC JONES
TSR SITE VAL FRANCIS TEAM SAC YANG

Any help would be appreicated.
Thank you
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hi vgirl76,

The VBA code you need is probably straightforward, but I would need to understand from the data example

RN SITE SAC GASTON SUSAN TEAM SAC BERNAL

What part is Job in column A and which is Site in Column B

Regards

ColinKJ
 
Upvote 0
Hi vgirl76,

The VBA code you need is probably straightforward, but I would need to understand from the data example

RN SITE SAC GASTON SUSAN TEAM SAC BERNAL

What part is Job in column A and which is Site in Column B

Regards

ColinKJ

Thanks for Responding Colin

Yes the data looks mushed together, sorry about that.

JOB contains either RN or TSR which is column A
SITE contains SITE SAC GASTON SUSAN which is column B
TEAM which is irrelevant contains TEAM SAC BERNAL which is column C

I am only concerned with columns A and B. I normally manually filter by colmn A and then by B and then take the results and paste to the appropriate worksheet which in the above case would be SACRN

I hope this was clear. Thank you
 
Upvote 0
Hi vgirl76,

OK we have a working model, can you send me a private message with an email address I can send it to.

ColinKJ
 
Upvote 0
Hi vgirl76,

OK we have a working model, can you send me a private message with an email address I can send it to.

ColinKJ
Since this is a public forum, any reason you wouldn't share your suggestion with everybody?
 
Upvote 0
No problem sharing anything with anyone but I'm not awear I can post a complete working Workbook on this site !!

ColinKJ
 
Upvote 0
No problem sharing anything with anyone but I'm not awear I can post a complete working Workbook on this site !!

ColinKJ
That's true, you can't post the complete workbook. :)

Most people just post some small screen shots and/or a few sample formulas (with Excel jeanie for example) if it is a formula approach or their code if it is a vba approach.
 
Upvote 0
Thank you Colin
I saw that it worked for your example
but when I pasted in my data it did not work. I got an error with the following highlighted:
ct = Sheets(Tabb).Cells(1, 14) + 1

I also tried to copy the code into my workbook and got the same result.

Also I have an existing workbook that already has the correct tabs (exisiting tabs)
and every month I replace the master worksheet with the new data and distribute accordingly.
In this code does it make new tabs?
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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