View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default If Cell = X, Then Copy Entire Row Into A New Sheet

Usually, I find it much, much better to keep all the data in one
location/worksheet.

Then I can use data|filter|autofilter to show the values I want. Or I can sort
the data or create charts or pivottables.

But one way to do this is to apply data|filter|autofilter, show the rows with
ADOTG and then copy the visible cells to a new worksheet.

If you really want a macro, you could record one when you do it manually.

====
But if you have other values in that column and want to separate them into
different sheets...

You may want to look at how Ron de Bruin and Debra Dalgleish approached this
kind of thing:

Ron de Bruin's EasyFilter addin:
http://www.rondebruin.nl/easyfilter.htm

Or:

Code from Debra Dalgleish's site:
http://www.contextures.com/excelfiles.html

Create New Sheets from Filtered List -- uses an Advanced Filter to create
separate sheet of orders for each sales rep visible in a filtered list; macro
automates the filter. AdvFilterRepFiltered.xls 35 kb

Update Sheets from Master -- uses an Advanced Filter to send data from
Master sheet to individual worksheets -- replaces old data with current.
AdvFilterCity.xls 55 kb



Mandy wrote:

Hi, I am very new to excel. I really need some help writing a macro or
formula. Basically, I have a spreadsheet that is a list of events.

I need a macro or formula that says If row C = ADOTG , Then Copy Entire
Row Into A New Sheet. (ADOTG is the name of the event). Can anyone help
this excel beginner?
Thanks Mandy

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson