Wikiposts
Search
Computer/Internet Issues & Troubleshooting Anyone with questions about the terribly complex world of computers or the internet should try here. NOT FOR REPORTING ISSUES WITH PPRuNe FORUMS! Please use the subforum "PPRuNe Problems or Queries."

Excel chart

Thread Tools
 
Search this Thread
 
Old 18th Feb 2012, 21:08
  #1 (permalink)  
Thread Starter
 
Join Date: Feb 2000
Location: Pacific
Posts: 731
Likes: 0
Received 0 Likes on 0 Posts
Excel chart

I am trying to make a weight and balance chart using Excel (line chart). I need to display the points in series for the empty weight, landing weight and takeoff weight.
My problem is that I cannot make the series show if the empty weight is a calculation result. The weight and cg for the empty weight is a result of a Choose function, using various types of configurations, thus it is a calculated value. I have seen that if I use a fixed value for the X axis instead of a calculated value, the line draws, but if not, the line does not show at all. The other values of the line are also calculated values, depending on the fuel on board at takeoff and landing, but they don't seem to be a problem, just the one given as a result of the Choose function and just the one axis.
I have tried to make the field a General display as well as a number, no change in the result. I have tried to make the value a simple calculation, with another field being the Choose result and the field I am trying to use be an = value, to no avail. Something I am missing, since I know this can be done and I have done it before, but I would appreciate help.
I need to make this work in Excel version 2003, because the people using it will not have access to anything later than that.
boofhead is offline  
Old 18th Feb 2012, 22:54
  #2 (permalink)  
 
Join Date: Apr 2005
Location: Earth
Posts: 366
Likes: 0
Received 0 Likes on 0 Posts
Might be worth posting on Windows Secrets Lounge. You will be able to upload your spreadsheet with your query for the experts to have a play with.

PS. Are you able to move the results of the calculations to another part of the spreadsheet and have them formatted as 'ordinary' numbers? By that I mean, can you do a Paste Link, reformat, then graph on those figures?

PPS. In fact, if Paste Link doesn't do it, copy the results, Paste Special|Values. This will remove the sums in the cell and just give a plain number.

Last edited by Spurlash2; 19th Feb 2012 at 17:47. Reason: PS. Just a thought... Pt2.
Spurlash2 is offline  
Old 19th Feb 2012, 22:23
  #3 (permalink)  
Moderator
 
Join Date: Feb 2000
Location: UK
Posts: 14,233
Received 52 Likes on 28 Posts
Hard to be sure from your description, but I suspect that you may be using the wrong graph plotting route. Make sure you are using X-Y.

Also, I can often save a lot of aggro if you copy ALL of your data into a couple of discrete columns off to the right somewhere, and plot from them. Then all Excel sees is numbers copied from another cell.

G
Genghis the Engineer is offline  
Old 20th Feb 2012, 02:34
  #4 (permalink)  
Thread Starter
 
Join Date: Feb 2000
Location: Pacific
Posts: 731
Likes: 0
Received 0 Likes on 0 Posts
I needed three data points for the series graph. They were the values from the weight and balance calculation for weight and cg at Empty, Landing and Takeoff. For some reason the values for landing and takeoff worked, but when I added the empty weight the line disappeared. If I put in a fixed value for empty weight cg, it worked, but the line was only accurate for one condition that way, any value of cg that did not agree with the empty weight cg that I chose would be wrong and the graph was wrong too.
The various empty weights were dependent on the airplane configuration, and those configurations were vastly different, depending on the equipment carried at the time. I have a Choose or If function to decide what the actual empty weight and balance would be, and the actual weight and balance calculations work well, giving good values. My problem is displaying the result on a chart.
I figured it was something to do with the way the calculation was done, and the result was not clean enough to use. I tried remoting the result, and using a copycat cell to make the graph but it did not work. I needed a way to simplify the calculation. I tried putting the actual Choose or If calculation in the cells used for the series graph, copying the original cell, but that only partly worked. It satisfied the Y axis but not the X axis.
I finally got something of a workaround. I made up a calculation by referring the cell that had the data with a mythical calc. In this case the cells that had the calculated data were C31 and D31. So I told the data set that needed to know the value of C31 (and D31 in its turn) that it was to use C31 with a calculation included. Thus the cell I was using to make the data set had the function "=C31+0". And it worked. Now the graph displays properly. Don't have any idea why.
It has worked so far on several computers using Excel 2003 and 2007 and 2010. I will need to see if it works with Open Office. Should be fun.
Until the next problem.
boofhead is offline  
Old 20th Feb 2012, 15:42
  #5 (permalink)  
 
Join Date: Mar 2003
Location: England
Posts: 286
Likes: 0
Received 0 Likes on 0 Posts
Hi Boofhead,

I am not a pilot, so I am having difficulty grasping what your chart is trying to show.

However, I do know a bit about excel. I think your problem is the 'choose' function. Excel has several different data types: eg numeric, text.

My suspicion is that the choose function is returning a string or text data type, so that when you try to chart it it interprets it as a Null value - hence the line disappears.

What the "=C31+0" is doing is forcing it into numeric data type, and so it is possible to chart the result.

HTH

EG
ExGrunt is offline  
Old 20th Feb 2012, 18:06
  #6 (permalink)  
 
Join Date: Apr 2005
Location: Earth
Posts: 366
Likes: 0
Received 0 Likes on 0 Posts
Humour me

boofhead,

Did you try the Copy|Paste Special|Values I mentioned in post No2?
Spurlash2 is offline  
Old 23rd Feb 2012, 01:53
  #7 (permalink)  
Thread Starter
 
Join Date: Feb 2000
Location: Pacific
Posts: 731
Likes: 0
Received 0 Likes on 0 Posts
No, I am not smart enough to understand what that meant.

I did format the values as numbers, but that alone did not do the trick. It was in fact a text function as you said so the result was being read as such. Thanks for the explanation, I might be able to get it working normally now.

Thanks for the help.
boofhead is offline  
Old 23rd Feb 2012, 10:56
  #8 (permalink)  
 
Join Date: Mar 2003
Location: England
Posts: 286
Likes: 0
Received 0 Likes on 0 Posts
BH,

I did format the values as numbers, but that alone did not do the trick.
FYI: Formatting cells as numbers will not solve a data type problem because the number formatting has four elements: 'positive format';'negative format';'zero format';'text format'

So a number format will happily display text. What you usually notice is that numbers are right aligned in a cell and text is left aligned, but this will not happen where the cells have been manually formatted eg centred.

BTW: CHOOSE is considered a bit of a legacy function held over for compatibility with older versions of Excel. The more modern approach is to use a combination of the INDEX and MATCH functions with a data table. However, given your expressed level of skill I would just stick with what works for you.

HTH

EG
ExGrunt is offline  
Old 24th Feb 2012, 21:46
  #9 (permalink)  
Thread Starter
 
Join Date: Feb 2000
Location: Pacific
Posts: 731
Likes: 0
Received 0 Likes on 0 Posts
Choose only allows 7 items to be compared, which is limiting. I could use Index or Match to better effect? Is it available in 2003 version of Excel?
boofhead is offline  
Old 24th Feb 2012, 21:59
  #10 (permalink)  
 
Join Date: Apr 2005
Location: Earth
Posts: 366
Likes: 0
Received 0 Likes on 0 Posts
In a word; Yes.

If you like, I can send some worked examples and also a spreadsheet, that I use everyday, which utilises the Index and Match functions.
Spurlash2 is offline  
Old 27th Feb 2012, 07:17
  #11 (permalink)  
 
Join Date: Mar 2003
Location: England
Posts: 286
Likes: 0
Received 0 Likes on 0 Posts
BH,

Yes, I would use INDEX and MATCH - which are available in Excel 2003.

The main caveat is that the search values MUST BE unique, otherwise MATCH will just return the first matching value it encounters.

Here is a short example:

In cells C2:C5 enter 1,2,3,4.

In cells D2:D5 enter Apple, Bananna, Orange, Pear.

In cell C8 enter 1.

In cell D8 enter: =INDEX(D2:D5,MATCH(C8,C2:C5,0),1)

Where:

D2:D5 is the data array
C8 is the search value
C2:C5 is the search array
0 sets the search to an exact match
1 returns the data from the first column in the data array

You will see that by changing the value in C8 the corresponding value is returned in D8.

The above references are relative references and so will change when the formula is copied to other cells. So it is better practice to use absolute references (ie $D$2:$D$5) or (my preference) named ranges for the data and search arrays, but that is a level of complexity that I will leave out of this example.


HTH

EG
ExGrunt is offline  

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 Off
Pingbacks are Off
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service

Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.