Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Can I conditionally format a line based on a cell value

I want a 2003 Excel autoshape to have a dashed line if a particular cell
value is zero or solid if the value is one. Can Excel do this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Can I conditionally format a line based on a cell value

I do not believe that can be done. I would suggest using a Pivot Table so you
can parse out the data you need, then you can click in the date field, go to
Data - sort, and click descending...

"eoinp" wrote:

I want a 2003 Excel autoshape to have a dashed line if a particular cell
value is zero or solid if the value is one. Can Excel do this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Can I conditionally format a line based on a cell value

Thanks - I suspected that this was the case - I could probably do what I want
with a VB macro but that seems like way too much work. Unfortunately, the
data is streaming from field instruments so a Pivot Table may be even more
cumbersome than a Macro....

"Sean Timmons" wrote:

I do not believe that can be done. I would suggest using a Pivot Table so you
can parse out the data you need, then you can click in the date field, go to
Data - sort, and click descending...

"eoinp" wrote:

I want a 2003 Excel autoshape to have a dashed line if a particular cell
value is zero or solid if the value is one. Can Excel do this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Can I conditionally format a line based on a cell value

Oops.. I put this uder the wrong question...

For this one, You can create such a thing using a Macro, but those aren't my
strong suit...

"Sean Timmons" wrote:

I do not believe that can be done. I would suggest using a Pivot Table so you
can parse out the data you need, then you can click in the date field, go to
Data - sort, and click descending...

"eoinp" wrote:

I want a 2003 Excel autoshape to have a dashed line if a particular cell
value is zero or solid if the value is one. Can Excel do this?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Can I conditionally format a line based on a cell value

Not without VBA

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
With ActiveSheet.Shapes("AutoShape 1")
If ActiveSheet.Range("A1").Value = 1 Then
.Line.DashStyle = msoLineSolid
ElseIf ActiveSheet.Range("A1").Value = 0 Then
.Line.DashStyle = msoLineDashDot
End If
End With
endit:
Application.EnableEvents = True
End Sub


This is sheet event code. Right-click on the sheet tab and "View Code".

Copy/paste the code into that module.

Enter a 1 or 0 in A1 and see the autoshape lines change.


Gord Dibben MS Excel MVP

On Fri, 7 Mar 2008 12:38:00 -0800, eoinp
wrote:

I want a 2003 Excel autoshape to have a dashed line if a particular cell
value is zero or solid if the value is one. Can Excel do this?




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
How do I conditionally delete rows based on cell contents? John Chan Excel Worksheet Functions 3 May 17th 23 03:45 AM
How do I conditionally format only some of the text in a cell? Goo Excel Worksheet Functions 9 April 9th 10 07:55 PM
how can I conditionally format a cell based on the value in a diff aquigley Excel Discussion (Misc queries) 15 August 21st 08 10:21 PM
how can I conditionally format a cell Part 2 aquigley Excel Discussion (Misc queries) 2 November 29th 07 05:17 PM
Conditionally format points based on a third column hmm Charts and Charting in Excel 3 October 14th 07 09:35 AM


All times are GMT +1. The time now is 01:58 AM.

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

About Us

"It's about Microsoft Excel"