How do I create very small graphics in ONE cell?

I have data like following and I want to creat a line or 3 bars to reflect 
the numbers in ONE cell so that people can quicky scan through the trend. 
	  	
 3,225 	 2,356 	 1,087 	

I tried wizard but it doesn't look good when you minimize it. 
I tried autoshape but couldn't let the ahotopshap connect to the numbers.

My boss said he has seen people do this before. Does anyone know how to do it?

Thanks!  
0
Noelle (1)
11/14/2005 11:26:02 PM
excel.charting 18370 articles. 0 followers. Follow

1 Replies
671 Views

Similar Articles

[PageSpeed] 37

There's a couple of ways to go.  The first is to adapt the idea behind
Using Worksheet Cells to simulate a graph
http://www.tushar-
mehta.com/excel/newsgroups/worksheet_as_chart/index.htm

While that uses conditional formatting as an example, the concept can 
be easily extended to show a bar chart using multiple columns.  In 
addition to other more obvious benefits, you can even have the bars 
change color depending on the value being shown.  On the downside, 
since the bar size will always be the width of a cell, the visual 
representation will move in discrete steps rather than as a smooth 
continuous shape.

A more complex alternative using a rectangle shape (from the Drawing 
toolbar) would require code.  The code below is a crude first-pass 
solution.  It works but can (should?) be made more robust.

It works by tracking column A values.  Each value is expected to be 
between 0 and 100.  The code adds a rectangle positioned over column B.  
The width of the rectangle reflects the value of the number in column 
A.  All these can be changed in the Worksheet_Change procedure below.

The first part of the code goes in the worksheet module.  Note that 
this is not something I would do in a 'full fledged' solution.  In such 
a case, the code would use a class module that included the appropriate 
application level event to track changes.  But, the below is easier for 
demonstration purposes.

On to the code...

In the worksheet's code module:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
    Dim x As Shape
    If Target.Column = 1 Then
        Set x = getShape(Target)
        x.Width = _
            Target.Value / 100 * Target.Offset(0, 1).Width
        End If
    End Sub

Next, in a standard module:
Option Explicit

Function addShape(aSheet As Worksheet, LocCell As Range) As Shape
    Dim x As Shape
    Set x = aSheet.Shapes.addShape( _
        msoShapeRectangle, 47.25, 13.5, 48.75, 11.25)
    With x
    .Name = "Rect" & LocCell.Row
    .Left = LocCell.Left
    .Top = LocCell.Top
    .Width = LocCell.Width
    .Height = LocCell.Height
    With .Fill
    .Visible = msoTrue
    .Solid
    .ForeColor.SchemeColor = 10
    .Transparency = 0#
        End With
    .Line.Visible = msoFalse
        End With
    Set addShape = x
    End Function
Function getShape(Target As Range) As Shape
    Dim x As Shape
    On Error Resume Next
    Set x = Target.Parent.Shapes("rect" & Target.Row)
    On Error GoTo 0
    If x Is Nothing Then
        Set getShape = addShape(Target.Parent, Target.Offset(0, 1))
    Else
        Set getShape = x
        End If
    End Function

-- 
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article <42EC06B4-281F-43E5-BB06-459C5C96242D@microsoft.com>, 
Noelle@discussions.microsoft.com says...
> I have data like following and I want to creat a line or 3 bars to reflect 
> the numbers in ONE cell so that people can quicky scan through the trend. 
> 	  	
>  3,225 	 2,356 	 1,087 	
> 
> I tried wizard but it doesn't look good when you minimize it. 
> I tried autoshape but couldn't let the ahotopshap connect to the numbers.
> 
> My boss said he has seen people do this before. Does anyone know how to do it?
> 
> Thanks!  
> 
0
11/15/2005 12:17:48 PM
Reply:

Similar Artilces:

create a roster
How can you create a weekly roster in which functions can be assigned to more than 10 people. The roster should be updatable, so that when holidays and days off are marked on the weekly roster they will be taken account of it future rosters. ...

graphics in Publisher #2
When viewing my document in Print Preview, only graphics appear. Does the document print in toto? Have you gone to the manufacturer's web site of your printer model and looked around for an updated driver? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "cmeeker" <cmeeker@discussions.microsoft.com> wrote in message news:B1EF4D42-295C-4BCF-A7D9-97362174FECF@microsoft.com... > When viewing my document in Print Preview, only graphics appear. Yes, the document does print. No, I haven't gone to the printer...

Several (x, y) coordinated lines on one graph
I am trying to plot for the general (x, y) coordinated dataset. For example, Series A (1, 50) (8, 90) (10, 300) (300, 500) Series B (3, 80) (400, 90) Series C (30, 80) (200, 120) and so on. The data is store on single worksheet Series Name x coordinate y coordinate A 1 50 A 8 90 A 10 300 A 300 500 B 3 80 B ...

Inserting a paragraph from one word
How can i insert a paragraph when I type in just one word. i.e. type in cycledim and that would be replaced with a description of what cycledim is. Thanks Create an AutoCorrect entry that replaces "cycledim" with whatever text you want. -- Stefan Blom Microsoft Word MVP "PawlingJohn" <PawlingJohn@discussions.microsoft.com> wrote in message news:8638BE82-BCDA-4AC9-AEB3-248CEF7E2606@microsoft.com... > How can i insert a paragraph when I type in just one word. i.e. type in > cycledim and that would be replaced with a description of what ...

importing or creating reference footnotes
I am trying to import a word document into publisher and it has reference footnotes within the document. The reference footnotes are not coming into the publisher document with the reference footnotes. Correct, they will not up to Publisher 2003. In Publisher 2003 depending on which version of Word you are using if they will or not. -- "If you don't know where you are going, any road will take you there!" ...

Mailbox not created when AD account created
A couple of days ago I noticed that I created a user account but the 'Email Addresses' tab of the user properies did not list any email addresses. Subsequent new user accounts have all experienced the same. I researched the knowledge and tried the recommended solutions to either manaully start the recipient update service or rebuild te recipient update service. Neither recommendation has resulted in a mailbox being created for this particular user or any additional user that I have created since this error first showed up. I performed a Windows update last Thursday and so I bel...

Reference to cell with text is returning #VALUE
I have a cell that references a different cell that that consists of H9:J9 that is formated for and contains text. The referenceing cell shows #VALUE instead of the actual text that is in the cell? Any ideas as to why this is happening? Any help would be appreciated. What does your formula look like? A simple link formula can only reference a single cell. Like this: =H9 You can't reference a range of cells like this: =H9:J9 That is why you're getting the error. -- Biff Microsoft Excel MVP "Jorist" <Jorist@discussions.microsoft.com> ...

Task Create - Status
I'm trying to make a simple task, when a user owner is assigned a task in CRM, it receives an email letting it know it has one. I have the following below, but it is not generating one when i assign one manually in the CRM. What to do? I've tried both the following: When task is created E-Mail to:[owner];Subject test As well as: When task is created if Task activity status = Open then E-Mail to:[owner];Subject test I've checked the mailserver many times over, and I can send emails manually from the CRM so you can rule that out Tested out ok on our end. Some ideas:...

Help Creating XmlNode / XmlAttribute Elegantly
I am creating a configuration class to read / write a standard configuration file. <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="ConnectionString" value="server=(local);" /> </appSettings> </configuration> I am using a XmlDocument for my base implementation. I am looking to see if there is a better way to add a new node / attribute than using XmlDocument.InnerXml. I would consider this to be a hack but couldn't really see another way of doing this without definin...

Bug with cell merging in tables using Applescript
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Once you have merged cells in a table in Word 2008 using Applescript, any further reference to the table's cells in the script produce an error. <br><br>As an example, open Word 2008 and run this script: <br> tell application &quot;Microsoft Word&quot; <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;make new table at active document with properties {number of rows:4, number of columns:4} <br> &nbsp;&nbsp;&nbsp;&nbsp...

Splitting one table into multiple tables/tabs
Hi I was wondering if anyone can help me split a table into multiple tables or tabs. If I have a table of 20 customers with various transactions over time all in one table. I'd like to know if it's possible to seperate the table into multiple tables based on the change in customer number and have them broken into multiple tabs without manually creating each tab and then cut and pasting. I really appreciate any help! Thanks! ...

Convert two separate Word documents into one
Anybody know how to merge/convert two separate (one page) Word document into one (two page) document? HELP> In news:B5526982-84F0-4552-A34F-7F72AB3DADDC@microsoft.com, CAOWEN <CAOWEN@discussions.microsoft.com> typed: > Anybody know how to merge/convert two separate (one page) Word > document into one (two page) document? > > HELP> Open one of them. PUt the cursor at the very bottom (CTRL-END keys works well for that). Click Insert File. Save the resulting combined file to a NEW NAME to avoid losing either of the two originals. HTH, Twayne ...

Create external database
Hi all. I need to create an external database (file). On a site I found this code: ------------------------------------------------------ Function CreateLinkedExternalTable(strTargetDB As String, strProviderString As String, strSourceTbl As String, strLinkTblName As String) As String 'strTargetDB = Source Database Name 'strProviderString = Not used, currently hard coded 'strSourceTbl = Source Table name in the database we are linking too. 'strLinkTblName = Table name we would like to see in the Access Database. Dim catDB As ADOX.Catalog Dim tblLink As...

How to create pie chart with %
I have got a problem that I don't if excel could help me to calculate the % within a column and draw a pie chart. My case is I have a column containing a series of numbers. e.g. 1,4,8,1,3,9,11,2,4,5,6,.........etc I want to draw a pie chart that showing 1-3 , 4-6, 7-9, >9 with the corresponding % inside that column. Can anyone tell me how can I make it ? Ray - You need to calculate the frequencies in your data. Let's assume your data is in A1:A12. In B1:B3 enter these numbers, the upper limits on the groupings: 3 6 9 You can enter ">9" into B4 witho...

Email address not created when a new user is created
All, This issue recently happened in my company. Upon creating a new user, the policy was set to create the smtp and X400 address automaticaly. Now when we create a user the smtp and x400 addresses are not created, and when attempting to setup the new user in outlook, the address cant be found. We are using exchange 2003 SP1 on Win2k3 servers. On Wed, 13 Jul 2005 06:49:07 -0700, "Bryan" <Bryan@discussions.microsoft.com> wrote: >All, >This issue recently happened in my company. Upon creating a new user, the >policy was set to create the smtp and X400 addres...

Stagnant cell for counting filtered data
I want to keep one cell that houses the count of the data depending on how it is filtered and that cell remain visible despite how it is filtered. I can't get the formula =COUNT(C9,C1:C100) to work or get it to stay visible if I change the filter. Place the formula in row 1 that contains your titles...........assuming you have these. =SUBTOTAL(2,C2:C100) the 2, means count If you don't have titles in row 1, place the formula after a blank row below your data. Note: you use COUNT in your original. COUNT only counts numerics. Maybe you want COUNTA which would be =SUBTOT...

when form created
I have a form which was created by someone else (not a form template) which is like a questionnaire with empty boxes to be completed. When the boxes are typed in all the margins move to accommodate the words being typed. Is there a way to fix/lock the original form and then just fill in the blank boxes? I suspect this is set up as a table with auto resizing enabled. Displaying table gridlines (Table | Show Gridlines) will help you see what you're dealing with. Then select the table, go to the Table tab of Table Properties, click Options, and clear the check box for "A...

Exchange 2010 MRM, no log files being created
I'm hoping someone can help me with this issue....it has been driving me crazy for days. I have enabled MRM logging on our exchange server, and I can see that some of the policies are working when I run start-managedfolderassistant. We have a retention policy tag on the deleteditems folder, and this does work. The problem is I am not getting any files in the MRM log directory. C:\Program Files\Microsoft\Exchange Server\V14\Logging\Managed Folder Assistant Events 9021 and 9022 are logged in the Application log, but where are the files? Below is the output of my mai...

Creating a Brochure
How do you create a 3-column brochure from scratch for Publisher 2002? I can only find the directions for the 2003 version. Quick help would be appreciated, project is due Monday. Create a three-panel or four-panel folded publication http://office.microsoft.com/en-us/assistance/HP011646681033.aspx Scroll down to the section that says "Build a three-panel or four-panel publications from scratch." -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Derek" <Derek@discussions.microsoft.com> wrote in message news...

How do I get the 2nd Mode in a range of cells
I want to attain the 2nd, 3rd, 4th, etc. most frequent number in a range of cells. Using the Mode function I can receive the most frequent but how do I get the 2nd, 3rd, 4th,etc. from the same range. Thanks. Hi assuming your list of numbers is in A1:A10 try the following formulas: B1: = MODE($A$1:$A$10) B2: (array entered with CTRL+SHIFT+ENTER) = MODE(IF(COUNTIF($B$1:B1,$A$1:$A$10)=0,$A$1:$A$10+{0,0})) -- Regards Frank Kabel Frankfurt, Germany anonymous@discussions.microsoft.com wrote: > I want to attain the 2nd, 3rd, 4th, etc. most frequent > number in a range of...

CRM 3.0 Small Business Edition
We are looking to deploy the above CRM version from Microsoft Action Pack - but are encountering some difficulties. Does this application have to be installed onto an SBS server directly? Can it not be installed on a server which participates in a SBS domain? Regards -- Mark Baker Operations Manager SITOC Ltd Must be installed on SBS server. Ian "Mark Baker" <MarkBaker@discussions.microsoft.com> wrote in message news:E202DEC8-C1A5-4A3E-86F3-094D462ECBE8@microsoft.com... > We are looking to deploy the above CRM version from Microsoft Action > Pack - > but are ...

Users mailboxes not created when user created
I have a problem that recently just started happening on my exchange 2003 server. When i create a new user account and create the mailbox for exchange, once im done, the mailbox isnt created, adn if you go into the properties of the user account adn go to the exchange email address tab, there isnt an smtp or an x.400 address listed. I am having to manually create and add these, adn then go delete the exchange mailbox and recreate it. This is really annoying and would love to know if anyone has any ideas of how to fix it. Thanks Jason In news:9F836A43-98BF-435A-AA43-AFF10124BE3F@micro...

How to create Access macro shortcut
I'm still using Access 97 and saw something the other day that I would like to use that was in Access 2000. In an Access 2000 database, there was a .mam file in a directory that launched the Access 2000 program and ran a macro. How do you set this up? Can it be done in Access 97? If so, how? Hi. > How do you set this up? Select the macro in the Database Window and right click with your mouse, then select "Create Shortcut..." in the pop-up menu. Follow the prompts for where to place the shortcut and what to name it. The default is: <PathToDeskTopDir>\Shortcut ...

moving records from one sheet to other
Hi I have 1400 records in one sheet. i want is as a read only sheet. now i need a selection cell and a push button for each and every record. when the shared users select their name from the selection cell then click one of the push button then the appropriate record should move to the sheet which is for that particular user. i have 15 sheets for every individual.can u plz help me out. i'm very new to excel. knight Hopefully this will help you some. This code would be attached to a single button - what it does is see if the currently active cell is in the proper column (with na...

Creating an ad book
How do I divide a page into equal sections (halves, qarters, eights)? I need to scan and type ads and coupons into this booklet. New at this. After managing to set up OE-QuoteFix on his new PC, Ed reads a message from FRSH <anonymous@discussions.microsoft.com>... > How do I divide a page into equal sections (halves, qarters, eights)? Arrange > Layout Guides > Grid Guides -- Ed Bennett - MVP Microsoft Publisher http://www.mvps.org/the_nerd/ Before reading this message, view the disclaimer: http://mvps.org/the_nerd/disclaim.htm ...