Macro Cutting Information - Help Needed Please Anyone?

midfieldgeneral11

Active Member
Joined
Feb 11, 2004
Messages
464
Hello everyone hope you having a good day.

Can you help this would be much appriciated.

I need to write a macro which is hard for me but could be easier for all you excel wizards.

I have a list of people as listed below which starts at January 2007 and goes down and then starts at February 2007 and then restarts at each month till December.

What I need is to be able run a macro and it to cut at February 2007 and put this into a new spreadsheet the problem is February 2007 could be at line 57 one day and then 62 the next the more names added the longer the list.

This is one spreadsheet and what I require is to split this into 12 months which can be then renamed for each month

So for example I want 1 - 56 which contains all January items. Like I said more items could get added so I need to cut the information as at every Month?

Can someone tell me the code I would need to do?

This would be much appriciated.

A quick response would be great
If you would like me to send you the spreadsheet so you can see what am working with then please let me know via this website youre email address.


1 January '07
2 Armytage, Hugh
3 Baker, Nyree
4 Barreto, Anthony
5 Bennett, Harry
6 Bennett, Michael
7 Bignell, Michael
8 Bright, Steven
9 Brown, Richard
10 Collecott, Robert
11 Connelly, Paul
12 Daniels, Steve
13 Du Sautoy, Nicholas
14 East, Christine
15 Embling, Bryony
16 Fellowes, Robert
17 Gray, Alex
18 Healy, Lynne
19 Henderson, Martin
20 Hillion, Barry
21 Hoad, Tom
22 Hoes, Stephen
23 Horne, David
24 Horstead, John
25 Howes, Russel
26 Hurley, Phillip
27 Johnson, Grant
28 Lee, Gemma
29 Lewis, Vicky
30 Maguire, Patrick
31 Maxwell-Gumbleton, Dickon
32 Mewett, Paul
33 Miller, Sonia
34 Nicholson, Gemma
35 Notley, David
36 Pembroke, Sam
37 Petto, Steven
38 Pinnington, Christopher
39 Rands, Simon
40 Raymond, Lianne
41 Regan, Tim
42 Saada, Mo
43 Seagroatt, Julia
44 Seffens, Ericka
45 Sherley-Price, Matthew
46 Spencer, David
47 Stanley, Clive
48 Sudbury, James
49 Taylor, Julian
50 Thain, Julie
51 Thompson, Kevin
52 Townsend, Lesley
53 Vincent, Alex
54 Vint, Jim
55 White, Michael
56 Wright, Danielle
57 February '07
58 Bailey, Andy
59 Baker, Nyree
60 Baldacci, Nick
61 Barreto, Anthony
62 Bennett, Harry
63 Bennett, Michael
64 Bignell, Michael
65 Bright, Steven
66 Brown, Richard
67 Brown, Simon
68 Collecott, Robert
69 Connelly, Paul
70 Daniels, Steve
71 Dewey, Stephen
72 Du Sautoy, Nicholas
73 Embling, Bryony
74 Gray, Alex
75 Healy, Lynne
76 Henderson, Martin
77 Hillion, Barry
78 Holliday, Mark
79 Horne, David
80 Horstead, John
81 Hurley, Phillip
82 Keenan, Gary
83 Lee, Gemma
84 Leonard, Terry
85 Lewis, Vicky
86 Maxwell-Gumbleton, Dickon
87 Mewett, Paul
88 Miller, Sonia
89 Mitchell, Robert
90 Nicholson, Gemma
91 Pembroke, Sam
92 Petto, Steven
93 Pinnington, Christopher
94 Raymond, Lianne
95 Saada, Mo
96 Sarjeant, Vicky
97 Seagroatt, Julia
98 Seffens, Ericka
99 Sherley-Price, Matthew
100 Spencer, David
101 Stanley, Clive
102 Stoneham, Mark
103 Taylor, Adam
104 Taylor, Julian
105 Taylor, Laura
106 Thain, Julie
107 Thompson, Kevin
108 Townsend, Lesley
109 Vincent, Alex
110 Vint, Jim
111 Walker, Paul
112 Watson, Alison
113 Webber, Keith
114 White, Michael
115 Wright, Danielle
116 March '07
117 Armytage, Hugh
118 Bailey, Andy
119 Baker, Nyree
120 Barreto, Anthony
121 Bennett, Harry
122 Bennett, Michael
123 Bright, Steven
124 Brown, Richard
125 Brown, Simon
126 Collecott, Robert
127 Connelly, Paul
128 Daniels, Steve
129 Dewey, Stephen
130 Du Sautoy, Nicholas
131 Embling, Bryony
132 Fellowes, Robert
133 Gray, Alex
134 Healy, Lynne
135 Hillion, Barry
136 Hoes, Stephen
137 Horne, David
138 Horstead, John
139 Howes, Russel
140 Hurley, Phillip
141 Johnson, Grant
142 Keeble, Matt
143 Keenan, Gary
144 Khatib, Ata
145 Lee, Gemma
146 Lewis, Vicky
147 Maguire, Patrick
148 Maxwell-Gumbleton, Dickon
149 Mewett, Paul
150 Miller, Paula
151 Miller, Sonia
152 Mitchell, Robert
153 Nicholson, Gemma
154 Notley, David
155 Pembroke, Sam
156 Petto, Steven
157 Rands, Simon
158 Raymond, Lianne
159 Regan, Tim
160 Saada, Mo
161 Sarjeant, Vicky
162 Seagroatt, Julia
163 Seffens, Ericka
164 Sidgwick, Jason
165 Spencer, David
166 Stanley, Clive
167 Stoneham, Mark
168 Taylor, Julian
169 Taylor, Laura
170 Thain, Julie
171 Thompson, Kevin
172 Townsend, Lesley
173 Vint, Jim
174 Walker, Paul
175 Watson, Alison
176 Webber, Keith
177 Westmoreland, Adam
178 White, Michael
179 Wright, Danielle
180 April '07
181 Armytage, Hugh
182 Bailey, Andy
183 Baker, Nyree
184 Barreto, Anthony
185 Bennett, Harry
186 Bennett, Michael
187 Bignell, Michael
188 Bright, Steven
189 Brown, Richard
190 Brown, Simon
191 Collecott, Robert
192 Connelly, Paul
193 Davies, Paul
194 Dewey, Stephen
195 Du Sautoy, Nicholas
196 East, Christine
197 Embling, Bryony
198 Fellowes, Robert
199 Gray, Alex
200 Healy, Lynne
201 Henderson, Martin
202 Hillion, Barry
203 Hoad, Tom
204 Hoes, Stephen
205 Holliday, Mark
206 Horne, David
207 Horstead, John
208 Hurley, Phillip
209 Johnson, Grant
210 Keeble, Matt
211 Keenan, Gary
212 Khatib, Ata
213 Lee, Gemma
214 Leonard, Terry
215 Lewis, Vicky
216 Mack, Sarah
217 Maguire, Patrick
218 Maxwell-Gumbleton, Dickon
219 Mewett, Paul
220 Mitchell, Robert
221 Morgan, Jonathan
222 Nicholson, Gemma
223 Notley, David
224 Pembroke, Sam
225 Petto, Steven
226 Raymond, Lianne
227 Regan, Tim
228 Saada, Mo
229 Sarjeant, Vicky
230 Seagroatt, Julia
231 Seffens, Ericka
232 Sherley-Price, Matthew
233 Sidgwick, Jason
234 Stanley, Clive
235 Stoneham, Mark
236 Sudbury, James
237 Taylor, Julian
238 Taylor, Laura
239 Thain, Julie
240 Thompson, Kevin
241 Townsend, Lesley
242 Vaughan, Les
243 Vincent, Alex
244 Vint, Jim
245 Walker, Paul
246 Webber, Keith
247 White, Michael
248 Wright, Danielle
249 May '07
250 Armytage, Hugh
251 Baker, Nyree
252 Bennett, Harry
253 Bennett, Michael
254 Bignell, Michael
255 Bright, Steven
256 Brown, Richard
257 Collecott, Robert
258 Connelly, Paul
259 Davies, Paul
260 Embling, Bryony
261 Healy, Lynne
262 Henderson, Martin
263 Horne, David
264 Horstead, John
265 Keenan, Gary
266 Khatib, Ata
267 Lewis, Vicky
268 Maguire, Patrick
269 Maxwell-Gumbleton, Dickon
270 Mewett, Paul
271 Miller, Paula
272 Miller, Sonia
273 Mitchell, Robert
274 Morgan, Jonathan
275 Nicholson, Gemma
276 Petto, Steven
277 Pinnington, Christopher
278 Raymond, Lianne
279 Regan, Tim
280 Seagroatt, Julia
281 Seffens, Ericka
282 Stanley, Clive
283 Stoneham, Mark
284 Sudbury, James
285 Taylor, Julian
286 Thain, Julie
287 Townsend, Lesley
288 Vaughan, Les
289 Walker, Paul
290 Watson, Alison
291 Webber, Keith
292 White, Michael
293 June '07
294 Armytage, Hugh
295 Bailey, Andy
296 Baker, Nyree
297 Bennett, Michael
298 Bright, Steven
299 Brown, Simon
300 Collecott, Robert
301 Connelly, Paul
302 Davies, Paul
303 East, Christine
304 Embling, Bryony
305 Fellowes, Robert
306 Gray, Alex
307 Healy, Lynne
308 Howes, Russel
309 Maguire, Patrick
310 Mewett, Paul
311 Mitchell, Robert
312 Nicholson, Gemma
313 Petto, Steven
314 Pinnington, Christopher
315 Raymond, Lianne
316 Regan, Tim
317 Spencer, David
318 Stoneham, Mark
319 Sudbury, James
320 Taylor, Adam
321 Taylor, Julian
322 Townsend, Lesley
323 Walker, Paul
324 Westmoreland, Adam
325 July '07
326 Armytage, Hugh
327 Baker, Nyree
328 Bennett, Michael
329 Daniels, Steve
330 Dewey, Stephen
331 East, Christine
332 Gray, Alex
333 Henderson, Martin
334 Holliday, Mark
335 Horne, David
336 Johnson, Grant
337 Mewett, Paul
338 Morgan, Jonathan
339 Pinnington, Christopher
340 Raymond, Lianne
341 Regan, Tim
342 Sarjeant, Vicky
343 Seagroatt, Julia
344 Seffens, Ericka
345 Stanley, Clive
346 Sudbury, James
347 Taylor, Julian
348 Thain, Julie
349 Thompson, Kevin
350 Townsend, Lesley
351 Vaughan, Les
352 Walker, Paul
353 Watson, Alison
354 Wright, Danielle
355 August '07
356 Armytage, Hugh
357 Baldacci, Nick
358 Bennett, Harry
359 Brown, Simon
360 Connelly, Paul
361 Daniels, Steve
362 Dewey, Stephen
363 Du Sautoy, Nicholas
364 Fellowes, Robert
365 Gray, Alex
366 Holliday, Mark
367 Horne, David
368 Howes, Russel
369 Miller, Sonia
370 Nicholson, Gemma
371 Pinnington, Christopher
372 Raymond, Lianne
373 Regan, Tim
374 Sarjeant, Vicky
375 Seagroatt, Julia
376 Sudbury, James
377 Thompson, Kevin
378 Vaughan, Les
379 Vincent, Alex
380 Walker, Paul
381 Watson, Alison
382 September '07
383 Baker, Nyree
384 Bennett, Michael
385 Connelly, Paul
386 Daniels, Steve
387 Henderson, Martin
388 Howes, Russel
389 Morgan, Jonathan
390 Pinnington, Christopher
391 Raymond, Lianne
392 Sarjeant, Vicky
393 Stanley, Clive
394 Townsend, Lesley
395 Wright, Danielle
396 October '07
397 Bailey, Andy
398 Dewey, Stephen
399 Mewett, Paul
400 Stanley, Clive
401 Taylor, Julian
402 Vaughan, Les
403 Walker, Paul
404 November '07
405 Taylor, Julian
406 Westmoreland, Adam
407 December '07
408 Bright, Steven
409 Connelly, Paul
410 Dewey, Stephen
411 Gray, Alex
412 Nicholson, Gemma
413 Raymond, Lianne
414 Taylor, Julian
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hello,

a bit crude, but how about

Code:
Sub SPLIT_MONTHS()
For MY_ROWS = 1 To Range("A65536").End(xlUp).Row
    If Right(Range("A" & MY_ROWS).Value, 2) = "07" Then
        MY_DESTINATION = Range("A" & MY_ROWS).Value
    End If
    If Not (IsNumeric(Right(Range("A" & MY_ROWS).Value, 1))) Then
        Range("A" & MY_ROWS).Copy Sheets(MY_DESTINATION).Range("A65536").End(xlUp).Offset(1, 0)
    End If
Next MY_ROWS
End Sub

this code copies the data to an existing sheet within the current spreadsheet Is this adequate?
 
Upvote 0
Does not work due to me probably not explaining it properly?

Is there any chance of sending this via email to show you the whole thing this would be very appriciated?

If you can tell me your email address I will send.

Thanks Simon
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,264
Members
449,075
Latest member
staticfluids

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