New sheet Help

smartguy

Well-known Member
Joined
Jul 14, 2009
Messages
778
need data in to new sheet based on school.



Excel Workbook
ABC
1NameClassschool
2A1kcz
3b1ms
4c1kcz
5d1kcz
6e1kcz
7f1mcz
8g1was
9h1ws
10i1was
11j1was
12k1ss
Sheet1


answer:
Sheet1

Excel Workbook
ABC
1NameClassschool
2A1kcz
3c1kcz
4d1kcz
5e1kcz
Sheet1


Sheet2

Excel Workbook
ABC
1NameClassschool
2f1mcz
Sheet2


Etc......
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi, Try this:-
NB:- I assumed your workbook already has the appropriate Sheets to copy to. (1 to 7) for the example case.
Code:
[COLOR="Navy"]Sub[/COLOR] MG19Jul40
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn1 [COLOR="Navy"]As[/COLOR] Range, c [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Long,[/COLOR] n [COLOR="Navy"]As[/COLOR] [COLOR="Navy"]Integer,[/COLOR] Dn2 [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Dim[/COLOR] Ray, ReRay
n = 1
[COLOR="Navy"]Set[/COLOR] Rng = Range(Range("c2"), Range("c" & Rows.Count).End(xlUp))
ReRay = Rng
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn1 [COLOR="Navy"]In[/COLOR] Rng
    [COLOR="Navy"]If[/COLOR] Dn1 <> "" [COLOR="Navy"]Then[/COLOR]
            c = 0
            ReDim Ray(1 To Rng.Count, 1 To 3)
            c = c + 1
            Ray(c, 1) = Dn1.Offset(, -2): Ray(c, 2) = Dn1.Offset(, -1): Ray(c, 3) = Dn1
        [COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn2 [COLOR="Navy"]In[/COLOR] Rng
            [COLOR="Navy"]If[/COLOR] Dn1 = Dn2 And Not Dn1.Address = Dn2.Address [COLOR="Navy"]Then[/COLOR]
                c = c + 1
                Ray(c, 1) = Dn2.Offset(, -2): Ray(c, 2) = Dn2.Offset(, -1): Ray(c, 3) = Dn2
                Dn2 = ""
            [COLOR="Navy"]End[/COLOR] If
        [COLOR="Navy"]Next[/COLOR] Dn2
            n = n + 1
            Sheets("Sheet" & n).Range("A2").Resize(c, 3) = Ray
    [COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] Dn1
Rng = ReRay
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Nice link, VoG. Am I failing to understand how to get volume on it, if there is volume?
Also, off topic but: what's an easy way to make a video like that? Thanks!
Tai
 
Upvote 0
Hi

You just need to turn up the volume on your PC.

Sorry but I don't know how to make videos like that - I think that you need special software.
 
Upvote 0

Forum statistics

Threads
1,221,469
Messages
6,160,028
Members
451,611
Latest member
PattiButche

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