Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Problem with cell references in my macro

This is a small problem I'm just giving it a very detailed explanation

Here's what I have:
I'm working on a macro that I will need to use every month. The data is
always in the same format/nomenclature but I want to filter out some data
that I don't need in my analysis. Each piece of data is on a seperate row
and I want to filter it by column "A." Like lets say some rows in column A
say "duck" some say "goose" and some say "dog." When I get the data the rows
are all mixed up like this:

A B
duck blah blah blah other data in other cells
duck blah blah blah other data in other cells
goose blah blah blah other data in other cells
duck blah blah blah other data in other cells
dog blah blah blah other data in other cells

Here's what I need to do:
In one step of my macro I want to be able to sort or filter the data and
copy and paste for instance just the rows starting with "duck" into another
sheet.

Here's my problem:
When I try to record a macro that does this I've tried using autofilters and
when I press ctrl down it records in the macro what cell it references
(instead of just always referring to where the data ends, after I've filtered
to just show the data I want to copy and paste).

If this doesn't make sense drop a note and I'll explain better
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Problem with cell references in my macro

You may want to look at the way Ron de Bruin and Debra Dalgleish approached it:

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

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

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Still Learning wrote:

This is a small problem I'm just giving it a very detailed explanation

Here's what I have:
I'm working on a macro that I will need to use every month. The data is
always in the same format/nomenclature but I want to filter out some data
that I don't need in my analysis. Each piece of data is on a seperate row
and I want to filter it by column "A." Like lets say some rows in column A
say "duck" some say "goose" and some say "dog." When I get the data the rows
are all mixed up like this:

A B
duck blah blah blah other data in other cells
duck blah blah blah other data in other cells
goose blah blah blah other data in other cells
duck blah blah blah other data in other cells
dog blah blah blah other data in other cells

Here's what I need to do:
In one step of my macro I want to be able to sort or filter the data and
copy and paste for instance just the rows starting with "duck" into another
sheet.

Here's my problem:
When I try to record a macro that does this I've tried using autofilters and
when I press ctrl down it records in the macro what cell it references
(instead of just always referring to where the data ends, after I've filtered
to just show the data I want to copy and paste).

If this doesn't make sense drop a note and I'll explain better


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to find and replace using cell references edeaston Excel Discussion (Misc queries) 1 December 22nd 08 03:29 PM
how to create a macro that references the currently active cell Kurt Excel Worksheet Functions 2 December 13th 06 05:49 PM
Macro without cell references...... Winnie_Shrub Excel Discussion (Misc queries) 1 June 28th 06 09:09 AM
peculiar problem in cell references while merging excel sheets Sri Excel Programming 0 June 2nd 04 02:16 PM
relative cell references in vba macro Sarah Bendele Excel Programming 2 January 19th 04 10:02 PM


All times are GMT +1. The time now is 12:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"