ExcelTip.com
Account Icon Account Icon Account Icon
ExcelTip.com

Go Back   Excel Help Forum > Usenet Groups > Excel Charting

Notices

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 08-13-2008, 05:04 PM
whisky whisky is offline
Registered User
 
Join Date: 13 Aug 2008
Location: Montreal
Posts: 2
whisky is on a distinguished road
If statement (array) in a chart

Hello,

I'm trying to create a line graph based on certain conditions.

The data is as follows:

Column A:
Date

Column E:
Site number (100, 101, 102, etc.)

Column G:
Traffic volume

A E G
01/08/08 100 1354
01/08/08 101 402983
...etc.

I would like to create a line graph of traffic volume during the last year, for site 100 only.
I managed to write an array formula to calculate the average based on the same conditions:

=AVERAGE(IF(INDEX('Entry Level'!$E:$E,(MATCH(INDEX('Entry Level'!$A:$A,COUNTA('Entry Level'!$A:$A))-365,'Entry Level'!$A:$A))): INDEX('Entry Level'!$E:$E,(MATCH(INDEX('Entry Level'!$A:$A,COUNTA('Entry Level'!$A:$A)),'Entry Level'!$A:$A)))=100, (INDEX('Entry Level'!$G:$G,(MATCH(INDEX('Entry Level'!$A:$A,COUNTA('Entry Level'!$A:$A))-30,'Entry Level'!$A:$A))): INDEX('Entry Level'!$G:$G,(MATCH(INDEX('Entry Level'!$A:$A,COUNTA('Entry Level'!$A:$A)),'Entry Level'!$A:$A)))), ""))

(Don't laugh, it works!)

However, I tried several things and do not seem to manage to create a graph.
Let say I try to create the graph just for this site (forget about the dates restriction for a moment).
I defined names "dates" and "traffic" the following way:

dates
=IF('Entry Level'!$E2:$E1789=100, 'Entry Level'!$A2:$A1789, "")

traffic
=IF('Entry Level'!$E2:$E1789=100, 'Entry Level'!$G2:$G1789, "")

But it does not seem to work.
Any ideas? I know it would make much more sense to try to do it in VBA but I do not know it yet...
And of course, it would help if data for each site was in separate columns, but there are several dozens sites and 3 values for each so it's much more neat like it is now.

Thanks,
Reply With Quote
  #2  
Old 08-14-2008, 09:23 AM
Andy Pope's Avatar
Andy Pope Andy Pope is offline
Forum Moderator
 
Join Date: 10 May 2004
Location: Essex, UK
Posts: 2,305
Andy Pope will become famous soon enough Andy Pope will become famous soon enough
We need more detail of what did not work?

Did you get an error?
Did the chart say you can not do something?
Does the chart not appear as you think it should?

Can you post an example?
__________________
Cheers
Andy
Reply With Quote
  #3  
Old 08-14-2008, 11:37 AM
MDOC MDOC is offline
Registered User
 
Join Date: 12 Aug 2008
Location: va
Posts: 5
MDOC is on a distinguished road
Quote:
Originally Posted by whisky
Hello,

I defined names "dates" and "traffic" the following way:

dates
=IF('Entry Level'!$E2:$E1789=100, 'Entry Level'!$A2:$A1789, "")

traffic
=IF('Entry Level'!$E2:$E1789=100, 'Entry Level'!$G2:$G1789, "")

But it does not seem to work.
Thanks,
Looks like you're specifying specific cell locations to find the value 100.
Reply With Quote
  #4  
Old 08-15-2008, 10:36 AM
whisky whisky is offline
Registered User
 
Join Date: 13 Aug 2008
Location: Montreal
Posts: 2
whisky is on a distinguished road
The chart plots some values - one along the x axis (y=0) and another along the y axis. But the conditions aren't met. It plots traffic values even if the site is not 100.

I'm trying to do it with VB now.
Reply With Quote
Reply

Bookmarks

New topics in Excel Charting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes 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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -4. The time now is 05:03 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0