ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro that copies range to new sheet (https://www.excelbanter.com/excel-programming/311466-macro-copies-range-new-sheet.html)

Jeff[_38_]

Macro that copies range to new sheet
 
I'm trying to get a macro to copy rows in column A to new sheets based
on the value in row A. I really could use some help! Thanks so much.


For example

original sheet has the values:

Column A, Column B
Red, 123
Red, 234
Red, 111
Blue, 124
Blue, 453
Yellow, 234
Yellow, 531
Yellow, 123

.... and the macro makes three new sheets:

New sheet1:
Column A, Column B
Red, 123
Red, 234
Red, 111

New sheet2:
Column A, Column B
Blue, 124
Blue, 453

New sheet3:
Column A, Column B
Yellow, 234
Yellow, 531
Yellow, 123

icestationzbra

Macro that copies range to new sheet
 

if you are familiar with VBA, then you could use some sample exce
sheets from debra's website www.contextures.com to hit the groun
running.

go over to the Files link, and download two sample files CopyToWkbk.xl
and ExtractUnique.xls. you could tweak and combine the two to get a cod
which fits your requirement

--
icestationzbr
-----------------------------------------------------------------------
icestationzbra's Profile: http://www.excelforum.com/member.php...nfo&userid=458
View this thread: http://www.excelforum.com/showthread.php?threadid=26354


Ron de Bruin

Macro that copies range to new sheet
 
Try this example (last macro)
http://www.rondebruin.nl/copy5.htm

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jeff" wrote in message om...
I'm trying to get a macro to copy rows in column A to new sheets based
on the value in row A. I really could use some help! Thanks so much.


For example

original sheet has the values:

Column A, Column B
Red, 123
Red, 234
Red, 111
Blue, 124
Blue, 453
Yellow, 234
Yellow, 531
Yellow, 123

... and the macro makes three new sheets:

New sheet1:
Column A, Column B
Red, 123
Red, 234
Red, 111

New sheet2:
Column A, Column B
Blue, 124
Blue, 453

New sheet3:
Column A, Column B
Yellow, 234
Yellow, 531
Yellow, 123




Jeff[_38_]

Macro that copies range to new sheet
 
Thanks! These worked very well. You helped me save someone about one
day of work / month.


All times are GMT +1. The time now is 09:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com