PC Review


Reply
Thread Tools Rate Thread

data filter criteria based on cell references?

 
 
=?Utf-8?B?c2NzaG9w?=
Guest
Posts: n/a
 
      22nd Jun 2007
I have a large series of data where the criteria for the data filter updates
a linked chart. The data looks as follows:

Time Stamp Data1 Data2 Data3 Data4
6/21/07 10:05AM 123 124 125 126
6/21/07 10:10AM 223 224 225 226
6/21/07 10:15AM 323 324 325 326
etc.

I use the data filter to select the criteria that is greater than or equal
to first specified date & time and is less than or equal to second specified
date & time. Because the chart is on a different sheet and there are other
input fields that are also required for the chart, I’m trying to automate as
much of the charting as possible.

I have two cells where I would input the start and end dates. How do you
create a macro that will take the start date as the first criteria in the
data filter and the end date as the second criteria? The start and end dates
will vary. When I’ve tried to create the macro, it will take the input start
date as the actual date, meaning, if I change the start date, I will still
get the original start date. Is there any way to use whatever I type in for
the start and end dates for the data filter criteria?

On a similar topic, since the chart updates to the parameters of the data
filter, the y-axis scale becomes skewed. I’ve created a formula to calculate
the min and max for the scale. Again the macro I’ve tried to create only
recognizes the actual value in the cell rather than the formula output. How
would I create a macro to recognize the result of the formula?

Thank you in advance.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?U2NvdHQ=?=
Guest
Posts: n/a
 
      22nd Jun 2007
Hi,

For the first part (getting the autofilter to update whenever you change the
date) you can do one of several things. 1 add a button that you press to
update the filters each time you change the date. (the VB for changing the
macro can be found from the macro recorder, then just modify the selection
criteria a bit) use a custom filter -> between x + y. Or you could also have
it run on a worksheet change event (ie when you change the date, the macro
will run and do the rest). There's probably other ways as well, but those
are two starts.

As for the graph problem, either have a button and change event like above
so each time the thing is changed it will be updated. I don't think you can
put a formula in the min/max values of a chart axis (but correct me if I'm
wrong)

"scshop" wrote:

> I have a large series of data where the criteria for the data filter updates
> a linked chart. The data looks as follows:
>
> Time Stamp Data1 Data2 Data3 Data4
> 6/21/07 10:05AM 123 124 125 126
> 6/21/07 10:10AM 223 224 225 226
> 6/21/07 10:15AM 323 324 325 326
> etc.
>
> I use the data filter to select the criteria that is greater than or equal
> to first specified date & time and is less than or equal to second specified
> date & time. Because the chart is on a different sheet and there are other
> input fields that are also required for the chart, I’m trying to automate as
> much of the charting as possible.
>
> I have two cells where I would input the start and end dates. How do you
> create a macro that will take the start date as the first criteria in the
> data filter and the end date as the second criteria? The start and end dates
> will vary. When I’ve tried to create the macro, it will take the input start
> date as the actual date, meaning, if I change the start date, I will still
> get the original start date. Is there any way to use whatever I type in for
> the start and end dates for the data filter criteria?
>
> On a similar topic, since the chart updates to the parameters of the data
> filter, the y-axis scale becomes skewed. I’ve created a formula to calculate
> the min and max for the scale. Again the macro I’ve tried to create only
> recognizes the actual value in the cell rather than the formula output. How
> would I create a macro to recognize the result of the formula?
>
> Thank you in advance.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Filter Data based on criteria haas786@yahoo.com Microsoft Excel Programming 3 10th Feb 2008 04:09 PM
Copying data based on filter criteria no_rhythm Microsoft Excel Worksheet Functions 1 10th Jan 2008 09:45 PM
Run Filter criteria based on data in range =?Utf-8?B?TWl0Y2g0?= Microsoft Excel Misc 0 17th Oct 2007 04:15 PM
Function based on multiple criteria from two cell references ibrokit Microsoft Excel Worksheet Functions 2 13th Oct 2007 06:57 PM
Filter Out data based on multiple criteria =?Utf-8?B?U3RldmUgV2lsZGVy?= Microsoft Excel Worksheet Functions 4 1st Dec 2003 04:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:29 AM.