ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional formatting? (https://www.excelbanter.com/excel-programming/399754-conditional-formatting.html)

T.Lindholm[_2_]

Conditional formatting?
 
Is there any way to use conditional formating onto auto shapes from excel
draw. I need to have a triangle shaped object, and it's parts should be able
to change color depending on a list of average values. If someone understands
what I mean by this and could give me an answer, it would be great and highly
appreciated.

JW[_2_]

Conditional formatting?
 
I don't believe you can use conditional formatting, but you can use
code similar to below in the Worksheet_Change event. Modify to suite:
If WorksheetFunction.Average(Range("E8:G8")) = 50 Then
ActiveSheet.Shapes("Oval 1") _
.Fill.ForeColor.SchemeColor = 37
Else
ActiveSheet.Shapes("Oval 1") _
.Fill.ForeColor.SchemeColor = 65
End If

T. Lindholm wrote:
Is there any way to use conditional formating onto auto shapes from excel
draw. I need to have a triangle shaped object, and it's parts should be able
to change color depending on a list of average values. If someone understands
what I mean by this and could give me an answer, it would be great and highly
appreciated.



T.Lindholm[_2_]

Conditional formatting?
 
Ok I got it to work, thanks a bunch! By the way if I need multiple criterias
to the code how should I type them?

"JW" wrote:

I don't believe you can use conditional formatting, but you can use
code similar to below in the Worksheet_Change event. Modify to suite:
If WorksheetFunction.Average(Range("E8:G8")) = 50 Then
ActiveSheet.Shapes("Oval 1") _
.Fill.ForeColor.SchemeColor = 37
Else
ActiveSheet.Shapes("Oval 1") _
.Fill.ForeColor.SchemeColor = 65
End If

T. Lindholm wrote:
Is there any way to use conditional formating onto auto shapes from excel
draw. I need to have a triangle shaped object, and it's parts should be able
to change color depending on a list of average values. If someone understands
what I mean by this and could give me an answer, it would be great and highly
appreciated.





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com